From cce5b4ca1f849283e75307f42bfe55fece75b553 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Tue, 4 Dec 2018 14:47:20 +0100 Subject: [PATCH] canvas/gui.nas prevent runtime error --- Nasal/canvas/gui.nas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Nasal/canvas/gui.nas b/Nasal/canvas/gui.nas index f182f2c40..bc23a9554 100644 --- a/Nasal/canvas/gui.nas +++ b/Nasal/canvas/gui.nas @@ -109,9 +109,10 @@ var Window = { me._canvas.del(); me._canvas = nil; } - - me._node.remove(); - me._node = nil; + if (me._node != nil) { + me._node.remove(); + me._node = nil; + } }, setTitle: func(title) {