From e15863fa7785583291ae2d03ccbdf5b3e8377047 Mon Sep 17 00:00:00 2001 From: smatz Date: Tue, 27 May 2008 23:40:36 +0000 Subject: (svn r13304) -Fix (r13042): possible double free (showed up in r13092) --- src/misc_gui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2