summaryrefslogtreecommitdiffstats
path: root/src/Reactor.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-26 23:07:24 -0400
committerDavid Robillard <d@drobilla.net>2022-05-26 23:22:40 -0400
commit6ff13ee2a86a516f27fa80bc9253781dfd3c7787 (patch)
tree588f69eb7e18c3ef8f040dc0ff28d0de5e6f9ee4 /src/Reactor.cpp
parent4a21f42341a9195a3aab5a0281c47740c8bedbc2 (diff)
downloadpatchage-6ff13ee2a86a516f27fa80bc9253781dfd3c7787.tar.gz
patchage-6ff13ee2a86a516f27fa80bc9253781dfd3c7787.tar.bz2
patchage-6ff13ee2a86a516f27fa80bc9253781dfd3c7787.zip
Avoid potential null dereferences
As judged by GCC anyway.
Diffstat (limited to 'src/Reactor.cpp')
-rw-r--r--src/Reactor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Reactor.cpp b/src/Reactor.cpp
index 6b141f8..b7458f2 100644
--- a/src/Reactor.cpp
+++ b/src/Reactor.cpp
@@ -89,7 +89,9 @@ Reactor::operator()(const action::DisconnectClient& action)
{
if (CanvasModule* mod = find_module(action.client, action.direction)) {
for (Ganv::Port* p : *mod) {
- p->disconnect();
+ if (p) {
+ p->disconnect();
+ }
}
}
}