mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Avoid null pointers when race conditions or faults are present in protocol closing
Avoid some of the detected faults
This commit is contained in:
@@ -43,18 +43,18 @@ namespace mRemoteNG.UI.Tabs
|
||||
}
|
||||
else
|
||||
{
|
||||
((InterfaceControl)Tag).Protocol.Close();
|
||||
((InterfaceControl)Tag)?.Protocol.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// close without the confirmation prompt...
|
||||
((InterfaceControl)Tag).Protocol.Close();
|
||||
((InterfaceControl)Tag)?.Protocol.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
((InterfaceControl)Tag).Protocol.Close();
|
||||
((InterfaceControl)Tag)?.Protocol.Close();
|
||||
}
|
||||
base.OnFormClosing(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user