# HG changeset patch # User smatz # Date 1211931636 0 # Node ID 5dfefab66454130dddb362e7fda5a92cb4ba173f # Parent b72de1fe60e148982fae47a93844c4e1ea36b315 (svn r13304) -Fix (r13042): possible double free (showed up in r13092) diff -r b72de1fe60e1 -r 5dfefab66454 src/misc_gui.cpp --- a/src/misc_gui.cpp Tue May 27 23:10:42 2008 +0000 +++ b/src/misc_gui.cpp Tue May 27 23:40:36 2008 +0000 @@ -1093,8 +1093,9 @@ ~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); }