[chronojump] Extra null check on delete_last_test_chronopic_clicked



commit d2f060457964ea77b95614d807a18b5c2ced1cf1
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sat Aug 21 10:58:23 2021 +0200

    Extra null check on delete_last_test_chronopic_clicked

 src/gui/app1/chronojump.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index e3b757c47..e384fe2b8 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -6540,7 +6540,11 @@ LogB.Debug("mc finished 5");
        }
        private void delete_last_test_chronopic_clicked (object o, EventArgs args)
        {
-               switch (currentEventType.Type) {
+               if(currentEventType == null) //precaution
+                       return;
+
+               switch (currentEventType.Type)
+               {
                        case EventType.Types.JUMP:
                                if(lastJumpIsSimple) {
                                        //maybe, after executing the test, user has selected other test on 
treeview


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]