Fix for crash report - check that event label is non-null

This commit is contained in:
baldurk
2014-11-22 09:49:36 +00:00
parent 54a8554439
commit caa5e06644
+1 -1
View File
@@ -1468,7 +1468,7 @@ namespace renderdocui.Windows
private void watchRegs_AfterLabelEdit(object sender, LabelEditEventArgs e)
{
if (e.Label.Length == 0 && e.Item < watchRegs.Items.Count - 1)
if ((e.Label == null || e.Label.Length == 0) && e.Item < watchRegs.Items.Count - 1)
watchRegs.Items.RemoveAt(e.Item);
else if (e.Label != null && e.Label.Length > 0 && e.Item == watchRegs.Items.Count - 1)
watchRegs.Items.Add(new ListViewItem(new string[] { "", "", "" }));