From: Robin Dunn Date: Mon, 2 May 2005 23:43:56 +0000 (+0000) Subject: Ensure the bitmap is good before drawing it. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/42233acb1f0c54cc37fd6d8444e7d1a4d6b8853c Ensure the bitmap is good before drawing it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/lib/statbmp.py b/wxPython/wx/lib/statbmp.py index 54dd9cc696..bd4ab44514 100644 --- a/wxPython/wx/lib/statbmp.py +++ b/wxPython/wx/lib/statbmp.py @@ -74,7 +74,8 @@ class GenStaticBitmap(wx.PyControl): def OnPaint(self, event): dc = wx.PaintDC(self) - dc.DrawBitmap(self._bitmap, 0, 0, True) + if self._bitmap: + dc.DrawBitmap(self._bitmap, 0, 0, True) def OnEraseBackground(self, event):