summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-04-26 15:42:02 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-04-26 15:42:02 -0300
commit65c96a71bd5593a7a6b0aaaf80ae68fceca849b9 (patch)
tree76ff34608ad89b3450632c37a293e886f997fe24 /scene
parent81f36b768d661b8bc69968c5bf823b8d9a747d41 (diff)
fix crash on exit for popup, fixes #1676
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/control.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index cef2941010..22559c238c 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -524,13 +524,15 @@ void Control::_notification(int p_notification) {
if (data.MI) {
- data.window->window->modal_stack.erase(data.MI);
+ if (data.window && data.window->window)
+ data.window->window->modal_stack.erase(data.MI);
data.MI=NULL;
}
if (data.SI) {
//erase from subwindows
- data.window->window->subwindows.erase(data.SI);
+ if (data.window && data.window->window)
+ data.window->window->subwindows.erase(data.SI);
data.SI=NULL;
}