UI: Fix macOS crash when saving general settings without Sparkle

This commit is contained in:
gxalpha 2023-03-17 18:54:02 +01:00 committed by Jim
parent 283b6a4789
commit 8ce4a2a154

View File

@ -3140,13 +3140,11 @@ void OBSBasicSettings::SaveGeneralSettings()
QT_TO_UTF8(themeData)); QT_TO_UTF8(themeData));
} }
#if defined(_WIN32) || defined(__APPLE__) #if defined(_WIN32) || defined(ENABLE_SPARKLE_UPDATER)
if (WidgetChanged(ui->enableAutoUpdates)) if (WidgetChanged(ui->enableAutoUpdates))
config_set_bool(GetGlobalConfig(), "General", config_set_bool(GetGlobalConfig(), "General",
"EnableAutoUpdates", "EnableAutoUpdates",
ui->enableAutoUpdates->isChecked()); ui->enableAutoUpdates->isChecked());
#endif
#if defined(_WIN32) || defined(ENABLE_SPARKLE_UPDATER)
int branchIdx = ui->updateChannelBox->currentIndex(); int branchIdx = ui->updateChannelBox->currentIndex();
QString branchName = QString branchName =
ui->updateChannelBox->itemData(branchIdx).toString(); ui->updateChannelBox->itemData(branchIdx).toString();