X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90230407984b0bbe9d6ed6ae6dc2376700ef1d42..2f36b4d22beeb7f4f0cedf922c0c26d037f54477:/src/common/toplvcmn.cpp diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 1ce788ef1f..b5d3e5e39d 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -3,7 +3,6 @@ // Purpose: common (for all platforms) wxTopLevelWindow functions // Author: Julian Smart, Vadim Zeitlin // Created: 01/02/97 -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -361,6 +360,14 @@ void wxTopLevelWindowBase::SetIcon(const wxIcon& icon) // whole client area void wxTopLevelWindowBase::DoLayout() { + // We are called during the window destruction several times, e.g. as + // wxFrame tries to adjust to its tool/status bars disappearing. But + // actually doing the layout is pretty useless in this case as the window + // will disappear anyhow -- so just don't bother. + if ( IsBeingDeleted() ) + return; + + // if we're using constraints or sizers - do use them if ( GetAutoLayout() ) {