mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-26 01:10:38 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user