]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
on demand creation of native CGContexts , so that pure text measuring contexts don...
[wxWidgets.git] / src / common / sizer.cpp
index 9d6d50de0b35cfc962d559c30ffbdf2039dc65c0..a691f6431c5af175f8741d922e325819d515c421 100644 (file)
@@ -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 )