From cdcccd8101b550730f3e970e633c1eb9e0a26295 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 19 Aug 2016 14:38:22 +0200 Subject: handle edge-case where jack-meta-data may be NULL, but the call succeeds this fixes #6968 --- libs/backends/jack/jack_portengine.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libs') diff --git a/libs/backends/jack/jack_portengine.cc b/libs/backends/jack/jack_portengine.cc index 934f8b5d9e..98d2744d7a 100644 --- a/libs/backends/jack/jack_portengine.cc +++ b/libs/backends/jack/jack_portengine.cc @@ -135,12 +135,15 @@ JACKAudioBackend::get_port_property (PortHandle port, const std::string& key, st jack_uuid_t uuid = jack_port_uuid((jack_port_t*) port); rv = jack_get_property(uuid, key.c_str(), &cvalue, &ctype); - if (0 == rv) { + if (0 == rv && cvalue && ctype) { value = cvalue; type = ctype; - jack_free(cvalue); - jack_free(ctype); + } else { + rv = -1; } + + jack_free(cvalue); + jack_free(ctype); return rv; #else return -1; -- cgit v1.2.3