From c2fd78b10fe4deafcc3f8f97c74f533d05cb4519 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 24 Sep 2001 00:16:48 +0000 Subject: [PATCH] ~wxToolBar() checks if the frame is being deleted in a better/more clear way git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/tbar95.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 46ab1c4fe2..1464a65e84 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -264,11 +264,8 @@ wxToolBar::~wxToolBar() { // we must refresh the frame size when the toolbar is deleted but the frame // is not - otherwise toolbar leaves a hole in the place it used to occupy - // - // NB: a frame is being deleted only if it is not any longer in - // wxTopLevelWindows list wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); - if ( frame && wxTopLevelWindows.Find(frame) ) + if ( frame && !frame->IsBeingDeleted() ) { frame->SendSizeEvent(); } -- 2.47.2