diff options
author | David Robillard <d@drobilla.net> | 2022-05-26 23:07:24 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-26 23:22:40 -0400 |
commit | 6ff13ee2a86a516f27fa80bc9253781dfd3c7787 (patch) | |
tree | 588f69eb7e18c3ef8f040dc0ff28d0de5e6f9ee4 /src/Reactor.cpp | |
parent | 4a21f42341a9195a3aab5a0281c47740c8bedbc2 (diff) | |
download | patchage-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.cpp | 4 |
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(); + } } } } |