X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmain.cc;h=65ce3538171563984cadf191f43d3d84fc9954c2;hb=6038ef44f9786b4b981760dcbcfd467ec8faf108;hp=10c9c306e71c65fd05d5bd7818fcfe9f1e37174d;hpb=d4f91010c37a3ce185bb3c8bcf6453503eccd2b2;p=ardour.git diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 10c9c306e7..65ce353817 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -31,6 +31,8 @@ #include #endif +#include + #include "pbd/error.h" #include "pbd/file_utils.h" #include "pbd/textreceiver.h" @@ -48,8 +50,9 @@ #include "ardour/filesystem_paths.h" #include +#include + #include -#include #include #include "ardour_ui.h" @@ -287,6 +290,11 @@ int main (int argc, char *argv[]) { ARDOUR::check_for_old_configuration_files(); + /* global init is not thread safe.*/ + if (curl_global_init (CURL_GLOBAL_DEFAULT)) { + cerr << "curl_global_init() failed. The web is gone. We're all doomed." << endl; + } + fixup_bundle_environment (argc, argv, localedir); load_custom_fonts(); /* needs to happen before any gtk and pango init calls */ @@ -377,6 +385,11 @@ int main (int argc, char *argv[]) if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str())) { error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg; + Gtk::Main main (argc, argv); + Gtk::MessageDialog msg (string_compose (_("Could not initialize %1 (likely due to corrupt config files).\n" + "Run %1 from a commandline for more information."), PROGRAM_NAME), + false, Gtk::MESSAGE_ERROR , Gtk::BUTTONS_OK, true); + msg.run (); exit (1); }