Fix a potential null reference bug

This commit is contained in:
Tim Young 2017-08-10 15:35:56 -05:00
parent e864276316
commit 15e0092699

View File

@ -451,6 +451,7 @@ namespace EduNetworkBuilder
if (tvClasswork.SelectedNode == null) return; if (tvClasswork.SelectedNode == null) return;
TreeNode Node = tvClasswork.SelectedNode; TreeNode Node = tvClasswork.SelectedNode;
if (Node == null) return; //Break out to avoid exploding
if (Node.Tag is SchoolworkClass) if (Node.Tag is SchoolworkClass)
{ {