mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
impr: Harden settings system to not crash ImHex when having outdated configs
Fixes #1514
This commit is contained in:
@@ -16,7 +16,7 @@ namespace hex::plugin::builtin {
|
||||
using namespace std::literals::chrono_literals;
|
||||
|
||||
std::string getWikipediaApiUrl() {
|
||||
auto setting = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.wiki_explain_language", "en").get<std::string>();
|
||||
auto setting = ContentRegistry::Settings::read<std::string>("hex.builtin.setting.interface", "hex.builtin.setting.interface.wiki_explain_language", "en");
|
||||
return "https://" + setting + ".wikipedia.org/w/api.php?format=json&action=query&prop=extracts&explaintext&redirects=10&formatversion=2";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user