summaryrefslogtreecommitdiffstats
path: root/src/libs/client/Store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client/Store.cpp')
-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);