Guard for null

This commit is contained in:
John Lewin 2018-10-31 22:11:24 -07:00
parent 1a3f48112c
commit 052e3c1fb1

View file

@ -234,7 +234,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
}
_selectedNode = value;
_selectedNode.HighlightRegion.BackgroundColor = theme.AccentMimimalOverlay;
if (_selectedNode != null)
{
_selectedNode.HighlightRegion.BackgroundColor = theme.AccentMimimalOverlay;
}
OnAfterSelect(null);
}
}