From: Julian Smart Date: Sat, 25 Nov 2006 11:47:50 +0000 (+0000) Subject: Don't allow zero size for clipping region, or wxX11 will crash X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/41e5224172b79812c4fe560f0a8d37dace23bac2 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 --- diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index d5832711b8..d4fa32eb39 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -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);