diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-06-23 15:04:01 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-06-23 15:04:01 +0000 |
commit | b52004a77770fa8d451c2fe6e2c44d43c68cde67 (patch) | |
tree | 9d1a5a0e06c97331146332d25eda4930b85c62a7 /libs | |
parent | 422607acfe28dc10fd8b188d12582a8a8cb916b9 (diff) |
various minor fixes for crashes reported by nowhiskey
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3486 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audioengine.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 15ccd852f7..a0287ab696 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -1227,8 +1227,16 @@ AudioEngine::reconnect_to_jack () for (PortConnections::iterator i = port_connections.begin(); i != port_connections.end(); ++i) { int err; + jack_client_t* j = _jack; + + /* JACK could have zombified us. */ + + if (!j) { + error << _("Disconnected from JACK while reconnecting. You should quit Ardour now.") << endmsg; + return -1; + } - if ((err = jack_connect (_jack, (*i).first.c_str(), (*i).second.c_str())) != 0) { + if ((err = jack_connect (j, (*i).first.c_str(), (*i).second.c_str())) != 0) { if (err != EEXIST) { error << string_compose (_("could not reconnect %1 and %2 (err = %3)"), (*i).first, (*i).second, err) |