Fix error when cloding standalone VDB
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 22 Sep 2018 01:01:34 +0100
changeset 106 2a95c11eb590
parent 105 41d3bdbb8e2b
child 107 d98c11f9a7f5
Fix error when cloding standalone VDB ...caused by redraw request once screen is already closed.
VDBEventLogApplication.st
--- a/VDBEventLogApplication.st	Mon Sep 10 16:49:07 2018 +0100
+++ b/VDBEventLogApplication.st	Sat Sep 22 01:01:34 2018 +0100
@@ -213,6 +213,14 @@
 !VDBEventLogApplication methodsFor:'event handling'!
 
 onEvent: aGDBEvent
+    (aGDBEvent isKindOf: GDBExitEvent) ifTrue:[
+        self unsubscribe.
+        ^self.
+    ].
+    ((aGDBEvent isKindOf: GDBCommandEvent) and:[aGDBEvent command isKindOf: GDBMI_gdb_exit]) ifTrue:[
+        self unsubscribe.
+        ^self.
+    ].
     self eventList add: aGDBEvent
 
     "Created: / 07-06-2014 / 14:33:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"