mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fix possible crash on invalid upscaling filter set in config
This commit is contained in:
@@ -350,7 +350,7 @@ EUpscalingFilter ScreenHandler::loadUpscalingFilter() const
|
|||||||
};
|
};
|
||||||
|
|
||||||
auto filterName = settings["video"]["upscalingFilter"].String();
|
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)
|
if (filter != EUpscalingFilter::AUTO)
|
||||||
return filter;
|
return filter;
|
||||||
|
|||||||
Reference in New Issue
Block a user