frontend: Fix dangling pointer in Audio Mixer logging

constData() returns a pointer into a temporary QByteArray that is
destroyed at the end of the statement, leaving a dangling pointer.
This commit is contained in:
tfo
2026-09-01 12:30:11 -04:00
committed by Ryan Foster
parent 4118c16004
commit 36d134ee9a
+3 -2
View File
@@ -629,8 +629,9 @@ void AudioMixer::updateVolumeLayouts()
OBSSource source = OBSGetStrongRef(control->weakSource());
if (!source) {
const char *cachedName = control->getCachedName().toUtf8().constData();
blog(LOG_INFO, "Tried to sort VolumeControl for '%s' but source is null", cachedName);
const QByteArray cachedName = control->getCachedName().toUtf8();
blog(LOG_INFO, "Tried to sort VolumeControl for '%s' but source is null",
cachedName.constData());
continue;
}