Skip to content

Commit

Permalink
(SharpTreeView) fix NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Mar 7, 2015
1 parent daf973b commit a82bf9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SharpTreeView/SharpTreeView.cs
Expand Up @@ -164,7 +164,8 @@ void UpdateFocusedNode(List<SharpTreeNode> newSelection, int topSelectedIndex)
// if we removed all selected nodes, then move the focus to the node
// preceding the first of the old selected nodes
SelectedIndex = topSelectedIndex;
FocusNode((SharpTreeNode)SelectedItem);
if (SelectedItem != null)
FocusNode((SharpTreeNode)SelectedItem);
}
}

Expand Down

0 comments on commit a82bf9a

Please sign in to comment.