Verify the validity of the buffer size in wxBufferedDC.
Passing invalid (e.g. negative) buffer size to wxBufferedDC resulted in many problems later on so refuse it immediately. Closes #13175. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8e370f7d07
commit
fe576f48fb
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user