handle edge-case where jack-meta-data may be NULL, but the call succeeds
this fixes #6968
This commit is contained in:
parent
45cd3482a2
commit
cdcccd8101
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user