From c2a93a9b3855f85830a715757b8c131113bc9a3e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 19 Jan 2012 22:25:03 +0000 Subject: [PATCH] if creating the splash fails for any reason, don't crash later when trying to use it git-svn-id: svn://localhost/ardour2/branches/3.0@11272 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index d381258ad5..c923e718b7 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -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; } } -- 2.30.2