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:
@@ -2161,6 +2161,12 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo
|
|||||||
|
|
||||||
if (!m_window) return;
|
if (!m_window) return;
|
||||||
|
|
||||||
|
if (width <= 0)
|
||||||
|
width = 1;
|
||||||
|
|
||||||
|
if (height <= 0)
|
||||||
|
height = 1;
|
||||||
|
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
rect.x = XLOG2DEV(x);
|
rect.x = XLOG2DEV(x);
|
||||||
rect.y = YLOG2DEV(y);
|
rect.y = YLOG2DEV(y);
|
||||||
|
Reference in New Issue
Block a user