diff --git a/Nasal/canvas/gui/Widget.nas b/Nasal/canvas/gui/Widget.nas index bcbd1c492..eb6018429 100644 --- a/Nasal/canvas/gui/Widget.nas +++ b/Nasal/canvas/gui/Widget.nas @@ -121,7 +121,7 @@ gui.Widget = { me._view = nil; } - if( me._focused ) + if( me._focused and me.getCanvas() ) me.getCanvas()._focused_widget = nil; }, # protected: