Ensure we never create empty bitmap in wxHtmlWindow::OnPaint().
Doing this resulted in an assert from wxBitmap ctor and was useless anyhow,
just skip the drawing code if the window is reduced to empty client area.
(cherry picked from commit bede8a3296
)
This commit is contained in:
committed by
Paul Cornett
parent
0ebeb6fa73
commit
7bc0fe7e58
@@ -1138,6 +1138,10 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
const wxRect rect = GetUpdateRegion().GetBox();
|
||||
const wxSize sz = GetClientSize();
|
||||
|
||||
// Don't bother drawing the empty window.
|
||||
if ( sz.x == 0 || sz.y == 0 )
|
||||
return;
|
||||
|
||||
// set up the DC we're drawing on: if the window is already double buffered
|
||||
// we do it directly on wxPaintDC, otherwise we allocate a backing store
|
||||
// buffer and compose the drawing there and then blit it to screen all at
|
||||
|
Reference in New Issue
Block a user