Fix crash when loading a film from the command line.
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2019 09:52:09 +0000 (10:52 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2019 09:52:09 +0000 (10:52 +0100)
src/tools/dcpomatic.cc

index 572a5be..d3cd2b0 100644 (file)
@@ -1552,6 +1552,9 @@ private:
 
                        _frame->Show ();
 
+                       signal_manager = new wxSignalManager (this);
+                       Bind (wxEVT_IDLE, boost::bind (&App::idle, this, _1));
+
                        if (!_film_to_load.empty() && boost::filesystem::is_directory (_film_to_load)) {
                                try {
                                        _frame->load_film (_film_to_load);
@@ -1572,9 +1575,6 @@ private:
                                }
                        }
 
-                       signal_manager = new wxSignalManager (this);
-                       Bind (wxEVT_IDLE, boost::bind (&App::idle, this, _1));
-
                        Bind (wxEVT_TIMER, boost::bind (&App::check, this));
                        _timer.reset (new wxTimer (this));
                        _timer->Start (1000);