mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
Fix possible crash on invalid upscaling filter set in config
This commit is contained in:
parent
cfac768b6e
commit
2ca77ed6ec
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user