# HG changeset patch # User smatz # Date 2008-05-27 23:40:36 # Node ID a18c5f13f1f981548a97925cf002266426a0a1a5 # Parent 8009f4745f6146135a8396699939d1ebc47a13e2 (svn r13304) -Fix (r13042): possible double free (showed up in r13092) diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1093,8 +1093,9 @@ struct QueryStringWindow : public QueryS ~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); }