X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/common/dcbufcmn.cpp diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index 2e3d792400..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 )