From: Jamie Gadd Date: Fri, 10 Feb 2006 21:44:54 +0000 (+0000) Subject: Toplevel windows don't have sibling static boxes. Fixes crash in AdjustStaticBoxZOrder. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/deb0d191ca6becf6b10e40b8180cc4a8e66d54ad 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 --- 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() )