summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-18 02:10:46 +0000
committerDavid Robillard <d@drobilla.net>2007-09-18 02:10:46 +0000
commit522f76df63657baa81cc2bedc7cc2c37679624ff (patch)
treea20686ff5163459cbc0a34de9440cd9b0fd9c5fe /src/libs/client
parentc7c29dfbbd6b237aada410ed36d5dcaaed8efbc8 (diff)
downloadingen-522f76df63657baa81cc2bedc7cc2c37679624ff.tar.gz
ingen-522f76df63657baa81cc2bedc7cc2c37679624ff.tar.bz2
ingen-522f76df63657baa81cc2bedc7cc2c37679624ff.zip
Fix destroying connected patch ports, and patch port threading issues.
git-svn-id: http://svn.drobilla.net/lad/ingen@718 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/Store.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index f5cead13..75eb943b 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -555,13 +555,15 @@ Store::disconnection_event(const Path& src_port_path, const Path& dst_port_path)
SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
- assert(src_port);
- assert(dst_port);
+ if (src_port)
+ src_port->disconnected_from(dst_port);
+ else
+ cerr << "WARNING: Disconnection from nonexistant src port " << src_port_path << endl;
- src_port->disconnected_from(dst_port);
- dst_port->disconnected_from(src_port);
-
- SharedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
+ if (dst_port)
+ dst_port->disconnected_from(dst_port);
+ else
+ cerr << "WARNING: Disconnection from nonexistant dst port " << dst_port_path << endl;
SharedPtr<PatchModel> patch = connection_patch(src_port_path, dst_port_path);