Small error handling check.
This commit is contained in:
@@ -221,6 +221,9 @@ bool attachAABBComponentFromModel(World* world, EntityID id)
|
|||||||
ComponentWrapper model = world->GetComponent(id, "Model");
|
ComponentWrapper model = world->GetComponent(id, "Model");
|
||||||
ComponentWrapper collision = world->AttachComponent(id, "AABB");
|
ComponentWrapper collision = world->AttachComponent(id, "AABB");
|
||||||
Model* modelRes = ResourceManager::Load<Model>(model["Resource"]);
|
Model* modelRes = ResourceManager::Load<Model>(model["Resource"]);
|
||||||
|
if (modelRes == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
glm::mat4 modelMatrix = modelRes->m_Matrix;
|
glm::mat4 modelMatrix = modelRes->m_Matrix;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user