summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/CreateGraph.cpp2
-rw-r--r--src/server/events/Disconnect.cpp9
-rw-r--r--src/server/events/DisconnectAll.cpp7
3 files changed, 7 insertions, 11 deletions
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 5be9d19e..c16c120c 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -103,8 +103,6 @@ void
CreateGraph::execute(ProcessContext& context)
{
if (_graph) {
- assert(_parent);
- assert(!_path.is_root());
_engine.maid()->dispose(_parent->compiled_graph());
_parent->compiled_graph(_compiled_graph);
}
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index 914e3375..65c5b078 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -149,9 +149,9 @@ Disconnect::pre_process()
_graph = src_block->parent_graph();
}
- assert(_graph);
-
- if (!_graph->has_edge(tail, head)) {
+ if (!_graph) {
+ return Event::pre_process_done(INTERNAL_ERROR, _head_path);
+ } else if (!_graph->has_edge(tail, head)) {
return Event::pre_process_done(NOT_FOUND, _head_path);
}
@@ -192,9 +192,6 @@ Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers)
_dst_input_port->recycle_buffers();
}
- assert(_edge);
- assert(port_edge == _edge.get());
-
return true;
}
diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp
index 019193e6..1548c5e1 100644
--- a/src/server/events/DisconnectAll.cpp
+++ b/src/server/events/DisconnectAll.cpp
@@ -107,7 +107,9 @@ DisconnectAll::pre_process()
_block = dynamic_cast<BlockImpl*>(object);
_port = dynamic_cast<PortImpl*>(object);
- assert((_block || _port) && !(_block && _port));
+ if (!_block && !_port) {
+ return Event::pre_process_done(INTERNAL_ERROR, _path);
+ }
}
// Find set of edges to remove
@@ -120,8 +122,7 @@ DisconnectAll::pre_process()
|| c->head()->parent_block() == _block) {
to_remove.insert(c);
}
- } else {
- assert(_port);
+ } else if (_port) {
if (c->tail() == _port || c->head() == _port) {
to_remove.insert(c);
}