Network list window opens with click on the menu item

This commit is contained in:
Grant Limberg 2016-11-08 16:31:07 -08:00
parent e1f9f7b6dc
commit 7cf3d2caa1
8 changed files with 57 additions and 42 deletions

View file

@ -19,7 +19,8 @@ namespace WinUI
private string url = null;
private static APIHandler instance;
private static volatile APIHandler instance;
private static object syncRoot = new Object();
public static APIHandler Instance
{
@ -27,7 +28,16 @@ namespace WinUI
{
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
{
if (!initHandler())
{
return null;
}
}
}
}
return instance;