fix invalid access blowout. Found when trying to get it to run on Linux

This commit is contained in:
Tim Young 2017-06-13 16:53:06 -05:00
parent 8f1c913424
commit a2c04e0bfd

View File

@ -54,7 +54,10 @@ namespace EduNetworkBuilder
if (dgv_VLANNames.Columns.Count > 0) if (dgv_VLANNames.Columns.Count > 0)
{ {
dgv_VLANNames.Columns[0].ReadOnly = LockedNames; dgv_VLANNames.Columns[0].ReadOnly = LockedNames;
dgv_VLANNames.Columns[1].ReadOnly = LockedNames; if (theNet.VLANPacketColors && dgv_VLANNames.Columns.Count > 1)
{
dgv_VLANNames.Columns[1].ReadOnly = LockedNames;
}
if(theNet.VLANPacketColors && dgv_VLANNames.Columns.Count > 2) if(theNet.VLANPacketColors && dgv_VLANNames.Columns.Count > 2)
{ {
dgv_VLANNames.Columns[2].ReadOnly = LockedNames; dgv_VLANNames.Columns[2].ReadOnly = LockedNames;