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:
Robin Dunn
2005-05-02 23:43:56 +00:00
parent be9b4caaea
commit 42233acb1f

View File

@@ -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):