diff --git a/src/ObjLoading/Game/IW5/Weapon/JsonWeaponAttachmentLoader.cpp b/src/ObjLoading/Game/IW5/Weapon/JsonWeaponAttachmentLoader.cpp index 5957ba83..71a77664 100644 --- a/src/ObjLoading/Game/IW5/Weapon/JsonWeaponAttachmentLoader.cpp +++ b/src/ObjLoading/Game/IW5/Weapon/JsonWeaponAttachmentLoader.cpp @@ -44,8 +44,17 @@ namespace return false; } - const auto jAttachment = jRoot.get(); - return CreateWeaponAttachmentFromJson(jAttachment, attachment); + try + { + const auto jAttachment = jRoot.get(); + return CreateWeaponAttachmentFromJson(jAttachment, attachment); + } + catch (const json::exception& e) + { + std::cerr << std::format("Failed to parse json of attachment: {}\n", e.what()); + } + + return false; } private: