diff --git a/integrations/bullet/src/simulation.cpp b/integrations/bullet/src/simulation.cpp index 89850768f0eab7eac4f71fc1caf115f579decdf9..85a3803781b208363cdda4bcad365f99ef3c6602 100644 --- a/integrations/bullet/src/simulation.cpp +++ b/integrations/bullet/src/simulation.cpp @@ -195,7 +195,9 @@ namespace fggl::phys::bullet { auto entRB = m_ecs->find<BulletBody>(); for (const auto& ent : entRB) { auto& bulletBody = m_ecs->get<BulletBody>(ent); - m_world->removeCollisionObject(bulletBody.body); + if ( bulletBody.body != nullptr ) { + m_world->removeCollisionObject(bulletBody.body); + } // release resources and delete bulletBody.release();