X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b35549525f2a8dd584fdda158829e8406da0541e..ede7b01760e920b31520b15c919445db882a8012:/src/common/wincmn.cpp?ds=inline diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index ac1fbb2f40..1c256cbdb7 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2291,7 +2291,9 @@ void wxWindowBase::SetConstraintSizes(bool recurse) if ( (constr->width.GetRelationship() != wxAsIs ) || (constr->height.GetRelationship() != wxAsIs) ) { - SetSize(x, y, w, h); + // We really shouldn't set negative sizes for the windows so make + // them at least of 1*1 size + SetSize(x, y, w > 0 ? w : 1, h > 0 ? h : 1); } else {