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
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user