Fixed issue with crash when invalid get_connections request is made on invalid port...
[ardour.git] / libs / ardour / port.cc
index 3252134ac3d48031153088f54d4cb3ab68eaf3bf..70c6a604d76b6ac33aef031cc70854fc61fea5cb 100644 (file)
@@ -165,7 +165,12 @@ Port::get_connections (std::vector<std::string> & c) const
                return c.size();
        }
 
-       return port_engine.get_connections (_port_handle, c);
+       if (_port_handle) {
+               return port_engine.get_connections (_port_handle, c);
+               return c.size();
+       }
+
+       return 0;
 }
 
 int