Fix crash on pressing space with no loaded film.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Mar 2018 00:43:43 +0000 (00:43 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Mar 2018 00:43:43 +0000 (00:43 +0000)
src/wx/film_viewer.cc

index 1103db159f5a5c2bdd1a98d8339c86cd4d056509..635a564c6558c241c04b62301203d7e8d5528a52 100644 (file)
@@ -505,6 +505,10 @@ FilmViewer::check_play_state ()
 void
 FilmViewer::start ()
 {
+       if (!_film) {
+               return;
+       }
+
        if (_audio.isStreamOpen()) {
                _audio.setStreamTime (_video_position.seconds());
                _audio.startStream ();