Просмотр исходного кода

UI: Add null check for rename of default theme

Without this, we strcmp a null pointer if no theme is set in the
configuration file.
stump 6 лет назад
Родитель
Сommit
bc99ec4d7c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      UI/obs-app.cpp

+ 1 - 1
UI/obs-app.cpp

@@ -1029,7 +1029,7 @@ bool OBSApp::InitTheme()
 	const char *themeName = config_get_string(globalConfig, "General",
 			"CurrentTheme");
 
-	if (strcmp(themeName, "Default") == 0)
+	if (themeName && strcmp(themeName, "Default") == 0)
 		themeName = "System";
 
 	if (!themeName) {