X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f2a8ba84486d549d655b095096127fb4014dd1c..eb3efe0d4b8a0964cd0504a69c0e9540c18e390c:/wxPython/wx/lib/statbmp.py 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):