]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
Update version to 2.9.4 in version.bkl too and rebake everything.
[wxWidgets.git] / src / common / sizer.cpp
index 9bc6fcc416cb72c3ea742914078d22e4fd3f82e4..f964661d2e52530adb157b11b9fa5fba5591f52f 100644 (file)
@@ -909,6 +909,11 @@ wxSize wxSizer::ComputeFittingClientSize(wxWindow *window)
 
         sizeMax = wxDisplay(disp).GetClientArea().GetSize();
 
+        // If determining the display size failed, skip the max size checks as
+        // we really don't want to create windows of (0, 0) size.
+        if ( !sizeMax.x || !sizeMax.y )
+            return size;
+
         // space for decorations and toolbars etc.
         sizeMax = tlw->WindowToClientSize(sizeMax);
     }