fix: Crash when receiving invalid data from API
This commit is contained in:
parent
3c6f52f5ea
commit
99dcd0a020
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user