Fix crash.
authorCarl Hetherington <cth@carlh.net>
Mon, 10 Sep 2018 22:39:37 +0000 (23:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 11 Sep 2018 10:58:15 +0000 (11:58 +0100)
src/wx/control_film_viewer.cc

index a374aec1bbd8c500385aca7d914086e5b7447f92..69b2b5b5cf29ecff55f3656113b85d5e2f8e87f6 100644 (file)
@@ -104,8 +104,6 @@ ControlFilmViewer::ControlFilmViewer (wxWindow* parent, bool outline_content, bo
        JobManager::instance()->ActiveJobsChanged.connect (
                bind (&ControlFilmViewer::active_jobs_changed, this, _2)
                );
-
-       _film->Change.connect (boost::bind (&ControlFilmViewer::film_change, this, _1, _2));
 }
 
 void
@@ -351,6 +349,8 @@ ControlFilmViewer::set_film (shared_ptr<Film> film)
 
        update_position_slider ();
        update_position_label ();
+
+       _film->Change.connect (boost::bind (&ControlFilmViewer::film_change, this, _1, _2));
 }
 
 void