summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-18 23:43:49 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-18 23:45:25 +0000
commite0932b9de21dcac6d88117437ff19b79d25ac64e (patch)
treee2ebfbec215741c2c4eed6af1dcd9527aa1b6d18
parent53188d05d3b1c99b92f11c6cdee371fc823c45f3 (diff)
Fix corrupted image (and probably crashes) when changing the player's
window size; we request images of the new size with set_video_container_size but some old ones from the butler (I think) will arrive. Check that the images are the right size before we try to construct a wxBitmap with them. Should fix #1242.
-rw-r--r--src/wx/film_viewer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index ade45d766..1103db159 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -373,7 +373,7 @@ FilmViewer::paint_panel ()
{
wxPaintDC dc (_panel);
- if (!_frame || !_film || !_out_size.width || !_out_size.height) {
+ if (!_frame || !_film || !_out_size.width || !_out_size.height || _out_size != _frame->size()) {
dc.Clear ();
return;
}