X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4107600f205d9d4951c0ffaa4aadb1bc2b75dcf2..80a779275ae04443c568dca919adb26cf6f5002c:/src/common/sizer.cpp?ds=inline diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 9d6d50de0b..a691f6431c 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -354,6 +354,11 @@ void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ ) size.y -= m_border; } + if (size.x < 0) + size.x = 0; + if (size.y < 0) + size.y = 0; + m_rect = wxRect(pos, size); switch ( m_kind )