Small error handling check.

This commit is contained in:
William Moberg
2015-12-17 17:48:00 +01:00
parent a26c8f2a24
commit 5e0fe975f3
+3
View File
@@ -221,6 +221,9 @@ bool attachAABBComponentFromModel(World* world, EntityID id)
ComponentWrapper model = world->GetComponent(id, "Model");
ComponentWrapper collision = world->AttachComponent(id, "AABB");
Model* modelRes = ResourceManager::Load<Model>(model["Resource"]);
if (modelRes == nullptr) {
return false;
}
glm::mat4 modelMatrix = modelRes->m_Matrix;