From d12f4ed37b30611fc8e623b09f886e36c4e91bc3 Mon Sep 17 00:00:00 2001 From: Florian Walpen Date: Sat, 22 Jan 2022 23:19:38 +0100 Subject: [PATCH] Missing check for graph manager in JackAPI. This seems to be the only place where the result of GetGraphManager() is not checked for null, at least in JackAPI. Found by llvm scan-build. --- common/JackAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/JackAPI.cpp b/common/JackAPI.cpp index 99661e63..03285ba9 100644 --- a/common/JackAPI.cpp +++ b/common/JackAPI.cpp @@ -510,7 +510,7 @@ LIB_EXPORT int jack_port_tie(jack_port_t* src, jack_port_t* dst) jack_error("jack_port_tie called with ports not belonging to the same client"); return -1; } else { - return manager->GetPort(mydst)->Tie(mysrc); + return (manager ? manager->GetPort(mydst)->Tie(mysrc) : -1); } }