From daa96baab5ff799d329051a49b6acc7670e9d249 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Tue, 9 Feb 2016 23:03:49 +0100 Subject: [PATCH] BoneAttachmentSystem fix for not having a skeleton --- src/Engine/Rendering/BoneAttachmentSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Engine/Rendering/BoneAttachmentSystem.cpp b/src/Engine/Rendering/BoneAttachmentSystem.cpp index c74ec9cd..bdc45fa6 100644 --- a/src/Engine/Rendering/BoneAttachmentSystem.cpp +++ b/src/Engine/Rendering/BoneAttachmentSystem.cpp @@ -21,6 +21,11 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp Skeleton* skeleton = model->m_RawModel->m_Skeleton; + + if(skeleton == nullptr) { + return; + } + const Skeleton::Animation* animation = skeleton->GetAnimation(parent["Animation"]["AnimationName1"]); if (!animation) {