diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-29 13:05:38 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-29 13:05:38 -0400 |
commit | 587439acf88ad8e57d832b5dd7cd60c41405c595 (patch) | |
tree | 15a931fefc16b532c1294fd3b42c0762609b6a45 /gtk2_ardour/ardour_ui.cc | |
parent | 99c8e5191868a1c499b3c5b260752898fd547afe (diff) |
fix crash on OS X el capitan when using command line arguments
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index d5498a2fc6..62043ead74 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3125,7 +3125,19 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess void ARDOUR_UI::load_from_application_api (const std::string& path) { + /* OS X El Capitan (and probably later) now somehow passes the command + line arguments to an app via the openFile delegate protocol. Ardour + already does its own command line processing, and having both + pathways active causes crashes. So, if the command line was already + set, do nothing here. + */ + + if (!ARDOUR_COMMAND_LINE::session_name.empty()) { + return; + } + ARDOUR_COMMAND_LINE::session_name = path; + /* Cancel SessionDialog if it's visible to make OSX delegates work. * * ARDOUR_UI::starting connects app->ShouldLoad signal and then shows a SessionDialog |