UI: Fix crash if there is no monitoring available
This commit is contained in:
parent
9d0c48af33
commit
c2122b0916
@ -5035,7 +5035,14 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="monitoringDevice"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="disableAudioDucking">
|
||||
<property name="text">
|
||||
<string>Basic.Settings.Advanced.Audio.DisableAudioDucking</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -5048,13 +5055,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="disableAudioDucking">
|
||||
<property name="text">
|
||||
<string>Basic.Settings.Advanced.Audio.DisableAudioDucking</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="lowLatencyBuffering">
|
||||
<property name="text">
|
||||
|
@ -592,8 +592,10 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
|
||||
// Remove the Advanced Audio section if monitoring is not supported, as the monitoring device selection is the only item in the group box.
|
||||
if (!obs_audio_monitoring_available()) {
|
||||
delete ui->audioAdvGroupBox;
|
||||
ui->audioAdvGroupBox = nullptr;
|
||||
delete ui->monitoringDeviceLabel;
|
||||
ui->monitoringDeviceLabel = nullptr;
|
||||
delete ui->monitoringDevice;
|
||||
ui->monitoringDevice = nullptr;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -648,9 +650,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
delete ui->browserHWAccel;
|
||||
delete ui->sourcesGroup;
|
||||
#endif
|
||||
#if defined(__APPLE__) || defined(PULSEAUDIO_FOUND)
|
||||
delete ui->disableAudioDucking;
|
||||
#endif
|
||||
|
||||
ui->rendererLabel = nullptr;
|
||||
ui->renderer = nullptr;
|
||||
ui->adapterLabel = nullptr;
|
||||
@ -664,10 +665,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
ui->browserHWAccel = nullptr;
|
||||
ui->sourcesGroup = nullptr;
|
||||
#endif
|
||||
#if defined(__APPLE__) || defined(PULSEAUDIO_FOUND)
|
||||
ui->disableAudioDucking = nullptr;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
delete ui->disableOSXVSync;
|
||||
|
Loading…
x
Reference in New Issue
Block a user