Added null propagation check for single click handler. resolves #422

This commit is contained in:
David Sparer
2017-03-01 17:35:13 -07:00
parent 9b74c470da
commit c915ac4a74

View File

@@ -264,7 +264,7 @@ namespace mRemoteNG.UI.Controls
if (mouseEventArgs.Clicks > 1) return;
OLVColumn column;
var listItem = GetItemAt(mouseEventArgs.X, mouseEventArgs.Y, out column);
var clickedNode = listItem.RowObject as ConnectionInfo;
var clickedNode = listItem?.RowObject as ConnectionInfo;
if (clickedNode == null) return;
SingleClickHandler.Execute(clickedNode);
}