service/pipewire: ignore metadata updates with null keys

Fixes #6
This commit is contained in:
outfoxxed 2024-10-06 00:57:19 -07:00
parent 3ed39b2a79
commit 8e40112d14
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -51,7 +51,8 @@ void PwDefaultTracker::onMetadataProperty(const char* key, const char* type, con
qCDebug(logDefaults).nospace() << "Got default metadata update for " << key << ": "
<< QString(value);
if (strcmp(key, "default.audio.sink") == 0) {
if (key == nullptr) return; // NOLINT(bugprone-branch-clone)
else if (strcmp(key, "default.audio.sink") == 0) {
nodeSetter = &PwDefaultTracker::setDefaultSink;
nameSetter = &PwDefaultTracker::setDefaultSinkName;
} else if (strcmp(key, "default.audio.source") == 0) {