self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
self.Bind(wx.EVT_PAINT, self.OnPaint)
- dc.DrawBitmap(self._bitmap, 0, 0, True)
+ if self._bitmap:
+ dc.DrawBitmap(self._bitmap, 0, 0, True)