Don't crash if we try to refresh a non-host node, just skip it

This commit is contained in:
baldurk
2016-10-27 20:35:52 +02:00
parent b36b120638
commit 886d49fd2a
+5 -2
View File
@@ -179,6 +179,11 @@ namespace renderdocui.Windows.Dialogs
{
TreelistView.Node node = o as TreelistView.Node;
RemoteHost host = node.Tag as RemoteHost;
if(host == null)
return;
Control p = node.OwnerView;
while (p.Parent != null)
p = p.Parent;
@@ -189,8 +194,6 @@ namespace renderdocui.Windows.Dialogs
string username = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
RemoteHost host = node.Tag as RemoteHost;
host.CheckStatus();
SetRemoteServerLive(node, host.ServerRunning, host.Busy);