X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f2a8ba84486d549d655b095096127fb4014dd1c..6cb4f153c300067e21eac198e4b57b47db9b9767:/wxPython/wx/lib/statbmp.py?ds=sidebyside 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):