diff --git a/docs/changes.txt b/docs/changes.txt index 90c27e6c19..77931bceee 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -587,6 +587,7 @@ All (GUI): in 64 bit builds (Tom Mettam, Rapid2D). - Fix wxCommandProcessor::IsDirty() return value which was wrong after undoing all commands without saving (Neil Chittenden). +- Fix crash when Destroy()-ing a TLW with non-TLW parent. wxGTK: diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index b5d3e5e39d..03504cc0fe 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -76,7 +76,7 @@ wxTopLevelWindowBase::~wxTopLevelWindowBase() ) { wxWindow * const win = wxDynamicCast(*i, wxWindow); - if ( win && win->GetParent() == this ) + if ( win && wxGetTopLevelParent(win->GetParent()) == this ) { wxPendingDelete.erase(i);