# HG changeset patch # User glx # Date 1210732355 0 # Node ID 42f48cb0d302b5a129aa0c36dbec8071635c45c5 # Parent 8d2fcedeb9e9f5e0c38ce84fb6fb19bfec608861 (svn r13083) -Fix (r13042): another segmentation fault when OskWindow's parent closes it diff -r 8d2fcedeb9e9 -r 42f48cb0d302 src/osk_gui.cpp --- a/src/osk_gui.cpp Wed May 14 01:57:12 2008 +0000 +++ b/src/osk_gui.cpp Wed May 14 02:32:35 2008 +0000 @@ -171,6 +171,8 @@ /* pass information by simulating a button press on parent window */ if (this->ok_btn != 0) { this->parent->OnClick(pt, this->ok_btn); + /* Window gets deleted when the parent window removes itself. */ + return; } } delete_this = true; @@ -180,6 +182,7 @@ if (this->cancel_btn != 0) { // pass a cancel event to the parent window this->parent->OnClick(pt, this->cancel_btn); /* Window gets deleted when the parent window removes itself. */ + return; } else { // or reset to original string strcpy(qs->text.buf, this->orig_str_buf); UpdateTextBufferSize(&qs->text);