1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: Crash when receiving invalid data from API

This commit is contained in:
WerWolv 2023-12-27 17:10:50 +01:00
parent 3c6f52f5ea
commit 99dcd0a020

View File

@ -173,8 +173,13 @@ namespace hex::plugin::builtin {
if (m_apiRequest.valid()) {
if (m_apiRequest.wait_for(0s) != std::future_status::ready)
reloading = true;
else
this->parseResponse();
else {
try {
this->parseResponse();
} catch (nlohmann::json::exception &e) {
log::error("Failed to parse store response: {}", e.what());
}
}
}
ImGui::BeginDisabled(reloading);