]> git.saurik.com Git - wxWidgets.git/commitdiff
fix spurious assert failure in DestroyGripper() which happened if the dialog hadn...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Aug 2008 10:53:02 +0000 (10:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Aug 2008 10:53:02 +0000 (10:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dialog.cpp

index 1b66274cc16b0364215816807f21935a469ee5a9..f65ece0b5d2fb9a35f11e7f8d3ecbf003e54ecd6 100644 (file)
@@ -391,8 +391,11 @@ void wxDialog::DestroyGripper()
     {
         // we used to have trouble with gripper appearing on top (and hence
         // overdrawing) the other, real, dialog children -- check that this
-        // isn't the case automatically
-        wxASSERT_MSG( ::GetNextWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
+        // isn't the case automatically (but notice that this could be false if
+        // we're not shown at all as in this case ResizeGripper() might not
+        // have been called yet)
+        wxASSERT_MSG( !IsShown() ||
+                      ::GetNextWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
             _T("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
         ::DestroyWindow((HWND) m_hGripper);
         m_hGripper = 0;