Don't crash when adding a NIC to a PC/server (Justin)

This commit is contained in:
Tim Young 2019-02-23 12:06:24 -06:00
parent fa163b3d21
commit 2ae5781bea

View File

@ -357,7 +357,7 @@ namespace EduNetworkBuilder
tnic = ndCLonedItem.AddNic(WhatToAdd[cbQuestions.SelectedIndex]); tnic = ndCLonedItem.AddNic(WhatToAdd[cbQuestions.SelectedIndex]);
} }
} }
if(tnet != null) if(tnet != null && tnic != null)
tnet.RegisterNICAdded(ndCLonedItem.hostname, tnic.NicName()); tnet.RegisterNICAdded(ndCLonedItem.hostname, tnic.NicName());
} }
UpdateForm(); UpdateForm();