UI: Fix crash if there is no monitoring available
This commit is contained in:
parent
9d0c48af33
commit
c2122b0916
2 changed files with 13 additions and 14 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue