Try to fix crash on startup in some cases.
authorCarl Hetherington <cth@carlh.net>
Thu, 3 Dec 2015 20:02:17 +0000 (20:02 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 3 Dec 2015 20:02:17 +0000 (20:02 +0000)
src/tools/dcpomatic_server.cc

index b45e579410845ced5fb438dc18c0be8062aaa498..cc783ede79033e14f9676b49446ec287bfed2cf6 100644 (file)
@@ -130,7 +130,7 @@ private:
        float _fps;
 };
 
-static shared_ptr<ServerLog> server_log (new ServerLog);
+static shared_ptr<ServerLog> server_log;
 
 class StatusDialog : public wxDialog
 {
@@ -263,6 +263,8 @@ private:
                        return false;
                }
 
+               server_log.reset (new ServerLog);
+
                dcpomatic_setup_path_encoding ();
                dcpomatic_setup_i18n ();
                dcpomatic_setup ();