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
void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h)
{
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 )
if ( !m_buffer || !m_buffer->IsOk() )
{
if ( w == -1 || h == -1 )