]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
fix for MGL bug when rendering text with solid background
[wxWidgets.git] / src / msw / toplevel.cpp
index 8874a8d15634d733962f2ff6cd165d40cc518733..4d4dbf1e17709276db5c48d5cf17aa44e1d9d6c8 100644 (file)
@@ -193,8 +193,9 @@ bool wxTopLevelWindowMSW::CreateDialog(const wxChar *dlgTemplate,
     {
         parent = wxTheApp->GetTopWindow();
 
-        // but don't use the window which is about to be destroyed as parent
-        if ( parent->IsBeingDeleted() )
+        // but don't use the window which is currently hidden as then the
+        // dialog would be hidden as well
+        if ( parent && !parent->IsShown() )
         {
             parent = NULL;
         }