if creating the splash fails for any reason, don't crash later when trying to use it
[ardour.git] / gtk2_ardour / ardour_ui.cc
index d381258ad512c9d33281863921856bd4de683839..c923e718b7ee1b5b98d9c9f1b0e2f13e1d1f53dd 100644 (file)
@@ -2565,8 +2565,10 @@ ARDOUR_UI::loading_message (const std::string& msg)
        }
 
        show_splash ();
-       splash->message (msg);
-       flush_pending ();
+       if (splash) {
+               splash->message (msg);
+               flush_pending ();
+       }
 }
 
 /** @param quit_on_cancel true if exit() should be called if the user clicks `cancel' in the new session dialog */
@@ -3000,6 +3002,7 @@ ARDOUR_UI::show_splash ()
                try {
                        splash = new Splash;
                } catch (...) {
+                       cerr << "Splash could not be created\n";
                        return;
                }
        }