Bläddra i källkod

UI: Reset service selection to custom if name not found

derrod 2 år sedan
förälder
incheckning
e55171f28c
1 ändrade filer med 4 tillägg och 5 borttagningar
  1. 4 5
      UI/window-basic-settings-stream.cpp

+ 4 - 5
UI/window-basic-settings-stream.cpp

@@ -140,11 +140,10 @@ void OBSBasicSettings::LoadStream1Settings()
 			QTStr("Basic.Settings.Stream.Custom.Password.ToolTip"));
 			QTStr("Basic.Settings.Stream.Custom.Password.ToolTip"));
 	} else {
 	} else {
 		int idx = ui->service->findText(service);
 		int idx = ui->service->findText(service);
-		if (idx == -1) {
-			if (service && *service)
-				ui->service->insertItem(1, service);
-			idx = 1;
-		}
+		/* 29.1 crash workaround: Fall back to "Custom" if service not found. */
+		if (idx == -1)
+			idx = 0;
+
 		ui->service->setCurrentIndex(idx);
 		ui->service->setCurrentIndex(idx);
 		lastServiceIdx = idx;
 		lastServiceIdx = idx;