From 6744a580431baa5ddb6c21a7862f99a67861113b Mon Sep 17 00:00:00 2001 From: antopilo Date: Sun, 24 Nov 2024 00:03:13 -0500 Subject: [PATCH] Fixed crash when deserializing a skinned mesh if no mesh is set --- Nuake/src/Resource/SkinnedModel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Nuake/src/Resource/SkinnedModel.cpp b/Nuake/src/Resource/SkinnedModel.cpp index 87e52205..f2c4ec60 100644 --- a/Nuake/src/Resource/SkinnedModel.cpp +++ b/Nuake/src/Resource/SkinnedModel.cpp @@ -119,6 +119,11 @@ namespace Nuake } else { + if (!j.contains("Meshes")) + { + return true; + } + for (auto& m : j["Meshes"]) { auto mesh = CreateRef();