Don't allow zero size for clipping region, or wxX11 will crash

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-11-25 11:47:50 +00:00
parent 3a2d0cecf9
commit 41e5224172

View File

@@ -2161,6 +2161,12 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo
if (!m_window) return;
if (width <= 0)
width = 1;
if (height <= 0)
height = 1;
wxRect rect;
rect.x = XLOG2DEV(x);
rect.y = YLOG2DEV(y);