mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Crash when receiving invalid data from API
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user