X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c9d9745fef51025196de74cc7092b08941a5d7f..c6a6bbbf637a5a580b7ab182483d27522f5e3189:/src/x11/dcclient.cpp diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index d5832711b8..291b93b268 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -1779,8 +1779,6 @@ void wxWindowDC::SetFont( const wxFont &font ) m_font = font; - return; - #if wxUSE_UNICODE m_fontdesc = font.GetNativeFontInfo()->description; #endif @@ -2161,6 +2159,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);