소스 검색

UI: Fix Settings save crash on old Windows versions

WidgetChanged doesn't contain a null check, resulting in a crash when
looking at the value for the new Hide OBS From Capture setting.

Fixes #5854
Matt Gajownik 3 년 전
부모
커밋
f9b038513a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      UI/window-basic-settings.cpp

+ 1 - 1
UI/window-basic-settings.cpp

@@ -2994,7 +2994,7 @@ void OBSBasicSettings::SaveGeneralSettings()
 				ui->enableAutoUpdates->isChecked());
 #endif
 #ifdef _WIN32
-	if (WidgetChanged(ui->hideOBSFromCapture)) {
+	if (ui->hideOBSFromCapture && WidgetChanged(ui->hideOBSFromCapture)) {
 		bool hide_window = ui->hideOBSFromCapture->isChecked();
 		config_set_bool(GetGlobalConfig(), "BasicWindow",
 				"HideOBSWindowsFromCapture", hide_window);