fix retrieval of port properties (metadata) when the value has no type
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 18 Oct 2016 20:45:39 +0000 (16:45 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 18 Oct 2016 20:46:33 +0000 (16:46 -0400)
libs/backends/jack/jack_portengine.cc

index 98d2744d7a5856abf3213181beb66186cbff946f..a73f4608aa58b7a12dd97baf4f3ab132d849646f 100644 (file)
@@ -135,9 +135,11 @@ 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 && cvalue && ctype) {
+       if (0 == rv && cvalue) {
                value = cvalue;
-               type = ctype;
+               if (ctype) {
+                       type = ctype;
+               }
        } else {
                rv = -1;
        }