X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..534f87c6c442aa2710a44352bd26d215fec1714b:/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() ) {