make reconnect to JACK work, after the _priv_jack fixes were added recently
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Oct 2009 22:31:49 +0000 (22:31 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Oct 2009 22:31:49 +0000 (22:31 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5753 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audioengine.cc

index bc528b2146abf6b8f4ba8369f2636e335f8c850d..f151815ba619e3c7f9cd6fc92e836f76677e3523 100644 (file)
@@ -1133,8 +1133,6 @@ AudioEngine::disconnect_from_jack ()
 int
 AudioEngine::reconnect_to_jack ()
 {
-        GET_PRIVATE_JACK_POINTER_RET (_jack,-1);
-
        if (_running) {
                disconnect_from_jack ();
                /* XXX give jackd a chance */
@@ -1146,8 +1144,13 @@ AudioEngine::reconnect_to_jack ()
                return -1;
        }
 
-       Ports::iterator i;
+       /* Now that we're connected again, we can get a private
+          pointer to the jack client.
+       */
 
+        GET_PRIVATE_JACK_POINTER_RET (_jack,-1);
+
+       Ports::iterator i;
        boost::shared_ptr<Ports> p = ports.reader ();
 
        for (i = p->begin(); i != p->end(); ++i) {