Skip to content

Commit 3f19958

Browse files
committed
Bug fix
#7179
1 parent 3578815 commit 3f19958

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ private async Task GetClashProxies(bool refreshUI)
174174

175175
public void RefreshProxyGroups()
176176
{
177+
if (_proxies == null)
178+
{
179+
return;
180+
}
181+
177182
var selectedName = SelectedGroup?.Name;
178183
_proxyGroups.Clear();
179184

@@ -229,7 +234,7 @@ public void RefreshProxyGroups()
229234
else
230235
{
231236
SelectedGroup = _proxyGroups.First();
232-
}
237+
}
233238
}
234239
else
235240
{
@@ -297,8 +302,10 @@ private void RefreshProxyDetails(bool c)
297302

298303
private ProxiesItem? TryGetProxy(string name)
299304
{
300-
if (_proxies is null)
305+
if (_proxies == null)
306+
{
301307
return null;
308+
}
302309
_proxies.TryGetValue(name, out var proxy2);
303310
if (proxy2 != null)
304311
{

0 commit comments

Comments
 (0)