From 9d9e1be1442cd98f6c1036d7c797422fe6b4652e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Jul 2012 20:01:27 +0100 Subject: Always make a DC in the paint event handler, otherwise all manner of strange shit happens. --- src/wx/film_viewer.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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 &) -- cgit v1.2.3