From 36d134ee9afff90ab7b067598949fed99b652559 Mon Sep 17 00:00:00 2001 From: tfo Date: Tue, 1 Sep 2026 02:41:05 +0200 Subject: [PATCH] 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. --- frontend/widgets/AudioMixer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/widgets/AudioMixer.cpp b/frontend/widgets/AudioMixer.cpp index d2695345d..699fd4f0b 100644 --- a/frontend/widgets/AudioMixer.cpp +++ b/frontend/widgets/AudioMixer.cpp @@ -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; }