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:43:49 +0000
commit7b56088a731550ce0b07f9454c70fde39982a69a (patch)
treeb3572d61f9b835a40f7b294c72b0f1d787509acd
parent8c0ca24cfddee9d1541fd2240ba62eaf52d18da5 (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;
}