Explorar el Código

Fix possible crash on invalid upscaling filter set in config

Ivan Savenko hace 9 meses
padre
commit
2ca77ed6ec
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      client/renderSDL/ScreenHandler.cpp

+ 1 - 1
client/renderSDL/ScreenHandler.cpp

@@ -350,7 +350,7 @@ EUpscalingFilter ScreenHandler::loadUpscalingFilter() const
 	};
 
 	auto filterName = settings["video"]["upscalingFilter"].String();
-	auto filter = upscalingFilterTypes.at(filterName);
+	auto filter = upscalingFilterTypes.count(filterName) ? upscalingFilterTypes.at(filterName) : EUpscalingFilter::AUTO;
 
 	if (filter != EUpscalingFilter::AUTO)
 		return filter;