fix IOProcessor state loading for half-duplex I/Os
authorRobin Gareus <robin@gareus.org>
Sun, 3 Apr 2016 01:06:15 +0000 (03:06 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 3 Apr 2016 01:06:15 +0000 (03:06 +0200)
libs/ardour/io_processor.cc

index 824006206fac1bb919d68d24a4dd226905a4ffac..6a6f09bbe21b5787f11d9a3ef215d0b0d394a330 100644 (file)
@@ -168,7 +168,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
        const string instr = enum_2_string (IO::Input);
        const string outstr = enum_2_string (IO::Output);
 
-       if (_own_input) {
+       if (_own_input && _input) {
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        const XMLProperty* prop;
                        if ((prop = (*niter)->property ("name")) != 0) {
@@ -197,7 +197,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
 
        }
 
-       if (_own_output) {
+       if (_own_output && _output) {
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        if ((*niter)->name() == "IO") {
                                const XMLProperty* prop;