fixed crashes

This commit is contained in:
viktorljung
2016-01-24 21:12:41 +01:00
parent 8cf9caf7aa
commit a304b00038
5 changed files with 59 additions and 40 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ struct ModelJob : RenderJob
Skeleton = Model->m_RawModel->m_Skeleton;
if (world->HasComponent(Entity, "Animation")) {
if (world->HasComponent(Entity, "Animation") && Skeleton != nullptr) {
auto animationComponent = world->GetComponent(Entity, "Animation");
Animation = model->m_RawModel->m_Skeleton->GetAnimation(animationComponent["Name"]);
AnimationTime = (double)animationComponent["Time"];