X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/957ea55146a1dd3e29ea803936527344672a947f..c8f80d27586a190927d491c618f48a4253246728:/src/common/dcbufcmn.cpp diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index ef8b9a34e6..8c6c25b40e 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -59,6 +59,14 @@ public: h > ms_buffer->GetHeight() ) { delete ms_buffer; + + // we must always return a valid bitmap but creating a bitmap of + // size 0 would fail, so create a 1*1 bitmap in this case + if ( !w ) + w = 1; + if ( !h ) + h = 1; + ms_buffer = new wxBitmap(w, h); } @@ -91,9 +99,6 @@ bool wxSharedDCBufferManager::ms_usingSharedBuffer = false; IMPLEMENT_DYNAMIC_CLASS(wxSharedDCBufferManager, wxModule) -IMPLEMENT_DYNAMIC_CLASS(wxBufferedDC, wxMemoryDC) -IMPLEMENT_ABSTRACT_CLASS(wxBufferedPaintDC, wxBufferedDC) - // ============================================================================ // wxBufferedDC // ============================================================================