Fixed Segfault from DeleteImage() and DeleteMesh()

This commit is contained in:
n00b
2025-04-12 13:26:00 -04:00
parent b67d63d32c
commit edb6462752
7 changed files with 215 additions and 199 deletions

View File

@@ -187,7 +187,12 @@ void rc_deleteMesh(int mesh_id)
return;
if(rc_mesh[mesh_id].mesh)
rc_mesh[mesh_id].mesh->drop();
{
if(rc_mesh[mesh_id].mesh->getReferenceCount() > 0)
{
SceneManager->getMeshCache()->removeMesh(rc_mesh[mesh_id].mesh);
}
}
rc_mesh[mesh_id].mesh = NULL;
rc_mesh[mesh_id].mesh_type = 0;