diff options
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 9cf128662..ac64a4fcc 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1093,8 +1093,9 @@ struct QueryStringWindow : public QueryStringBaseWindow ~QueryStringWindow() { if (!this->handled && this->parent != NULL) { - this->handled = true; - this->parent->OnQueryTextFinished(NULL); + Window *parent = this->parent; + this->parent = NULL; // so parent doesn't try to delete us again + parent->OnQueryTextFinished(NULL); } ClrBit(_no_scroll, SCROLL_EDIT); } |