X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe5d86ed04a964e2bbcddae1be7e496b244981dd..e964136c08cb6ebf66e8778d0aab737fe8d17f67:/src/common/tbarbase.cpp diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index d78bcf6fe8..d2243fedf2 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -623,7 +623,8 @@ void wxToolBarBase::UpdateWindowUI(long flags) // There is no sense in updating the toolbar UI // if the parent window is about to get destroyed - if (GetParent() && wxPendingDelete.Member( GetParent() )) + wxWindow *tlw = wxGetTopLevelParent( this ); + if (tlw && wxPendingDelete.Member( tlw )) return; wxEvtHandler* evtHandler = GetEventHandler() ;