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">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="monitoringDevice"/>
|
<widget class="QComboBox" name="monitoringDevice"/>
|
||||||
</item>
|
</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">
|
<spacer name="horizontalSpacer_11">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -5048,13 +5055,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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">
|
<item row="2" column="1">
|
||||||
<widget class="QCheckBox" name="lowLatencyBuffering">
|
<widget class="QCheckBox" name="lowLatencyBuffering">
|
||||||
<property name="text">
|
<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.
|
// 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()) {
|
if (!obs_audio_monitoring_available()) {
|
||||||
delete ui->audioAdvGroupBox;
|
delete ui->monitoringDeviceLabel;
|
||||||
ui->audioAdvGroupBox = nullptr;
|
ui->monitoringDeviceLabel = nullptr;
|
||||||
|
delete ui->monitoringDevice;
|
||||||
|
ui->monitoringDevice = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -648,9 +650,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||||||
delete ui->browserHWAccel;
|
delete ui->browserHWAccel;
|
||||||
delete ui->sourcesGroup;
|
delete ui->sourcesGroup;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) || defined(PULSEAUDIO_FOUND)
|
|
||||||
delete ui->disableAudioDucking;
|
delete ui->disableAudioDucking;
|
||||||
#endif
|
|
||||||
ui->rendererLabel = nullptr;
|
ui->rendererLabel = nullptr;
|
||||||
ui->renderer = nullptr;
|
ui->renderer = nullptr;
|
||||||
ui->adapterLabel = nullptr;
|
ui->adapterLabel = nullptr;
|
||||||
@ -664,10 +665,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||||||
ui->browserHWAccel = nullptr;
|
ui->browserHWAccel = nullptr;
|
||||||
ui->sourcesGroup = nullptr;
|
ui->sourcesGroup = nullptr;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) || defined(PULSEAUDIO_FOUND)
|
|
||||||
ui->disableAudioDucking = nullptr;
|
ui->disableAudioDucking = nullptr;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
delete ui->disableOSXVSync;
|
delete ui->disableOSXVSync;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user