summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-25 20:01:27 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-25 20:01:27 +0100
commit9d9e1be1442cd98f6c1036d7c797422fe6b4652e (patch)
treecb7f4b26ab49c130d6c496606058530d05e5b2b5 /src
parente60ff6efc30f494218bd8354ba7d9235c60a5aa0 (diff)
Always make a DC in the paint event handler, otherwise all manner of strange shit happens.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 6f5625293..b1af469a8 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -52,12 +52,10 @@ public:
void paint_event (wxPaintEvent& ev)
{
- if (!_bitmap) {
- return;
- }
-
wxPaintDC dc (this);
- dc.DrawBitmap (*_bitmap, 0, 0, false);
+ if (_bitmap) {
+ dc.DrawBitmap (*_bitmap, 0, 0, false);
+ }
}
void size_event (wxSizeEvent &)