From deb0d191ca6becf6b10e40b8180cc4a8e66d54ad Mon Sep 17 00:00:00 2001 From: Jamie Gadd Date: Fri, 10 Feb 2006 21:44:54 +0000 Subject: [PATCH] Toplevel windows don't have sibling static boxes. Fixes crash in AdjustStaticBoxZOrder. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index ee37aeb2c7..5273cbc4d6 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1428,6 +1428,10 @@ void wxWindowMSW::Update() // a drop target static inline void AdjustStaticBoxZOrder(wxWindow *parent) { + // no sibling static boxes if we have no parent (ie TLW) + if ( !parent ) + return; + for ( wxWindowList::compatibility_iterator node = parent->GetChildren().GetFirst(); node; node = node->GetNext() ) -- 2.45.2