X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6933ff9111c872f32f0bab7606251c53375679e..2e14066008229145e2da7b9f05a478ce38631f83:/src/common/dcbufcmn.cpp?ds=sidebyside diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index ad748d6ca3..2a8314d43e 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -105,6 +105,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxSharedDCBufferManager, wxModule) void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h) { + wxCHECK_RET( w >= -1 && h >= -1, "Invalid buffer size" ); + if ( !m_buffer || !m_buffer->IsOk() ) { if ( w == -1 || h == -1 ) @@ -132,7 +134,7 @@ void wxBufferedDC::UnMask() // Ensure the scale matches the device SetUserScale(1.0, 1.0); - + if ( m_style & wxBUFFER_CLIENT_AREA ) GetDeviceOrigin(&x, &y);