From 6ff13ee2a86a516f27fa80bc9253781dfd3c7787 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 May 2022 23:07:24 -0400 Subject: Avoid potential null dereferences As judged by GCC anyway. --- src/Reactor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Reactor.cpp') 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(); + } } } } -- cgit v1.2.1