Permalink
Browse files

In wxChartPanel::ResizeBackBitmap make sure we do not attempt to crea…

…te an invalid bitmap which has started asserting recently, see http://trac.wxwidgets.org/changeset/3d2d8fc4ab9e5b1623b5839a59a909fdafe30a09/git-wxWidgets
  • Loading branch information...
PBfordev committed Aug 13, 2015
1 parent 2e26b42 commit 6e74f178b9dcace85fa9acbec89b59872d6ffb4e
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/chartpanel.cpp
View
@@ -357,5 +357,9 @@ void wxChartPanel::RedrawBackBitmap()
void wxChartPanel::ResizeBackBitmap(wxSize size)
{
m_backBitmap.Create(size.GetWidth(), size.GetHeight());
// make sure we do not attempt to create a bitmap
// with invalid size (width and/or height < 1)
size.IncTo(wxSize(1, 1));
m_backBitmap.Create(size.GetWidth(), size.GetHeight());
}

0 comments on commit 6e74f17

Please sign in to comment.