]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbr95.cpp
Fix for probably rare but potential refcount leak.
[wxWidgets.git] / src / msw / statbr95.cpp
index db9f9fab2461cedadf3223852a7cf9da853b1381..5f49a730188be3e565cb2c9f21876d32ad8c6e23 100644 (file)
@@ -125,6 +125,14 @@ bool wxStatusBar95::Create(wxWindow *parent,
 
 wxStatusBar95::~wxStatusBar95()
 {
+    // we must refresh the frame size when the statusbar is deleted but the
+    // frame is not - otherwise statusbar leaves a hole in the place it used to
+    // occupy
+    wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
+    if ( frame && !frame->IsBeingDeleted() )
+    {
+        frame->SendSizeEvent();
+    }
 }
 
 void wxStatusBar95::SetFieldsCount(int nFields, const int *widths)