X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..0a7e80ec291ee33cea0eb05a00e9ee5c8306ae45:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 9bc6fcc416..f964661d2e 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -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); }