From 509c8db393938df75df890342dd184782baae4b0 Mon Sep 17 00:00:00 2001 From: TeslaRus Date: Thu, 14 Jul 2016 13:44:45 +0400 Subject: [PATCH] fixed game crash if unitialized ghosts are updated; --- src/physics_bullet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics_bullet.cpp b/src/physics_bullet.cpp index 9bdb9da87..728bc6475 100644 --- a/src/physics_bullet.cpp +++ b/src/physics_bullet.cpp @@ -687,7 +687,7 @@ void Physics_GetGhostWorldTransform(struct physics_data_s *physics, float tr[16] void Physics_SetGhostWorldTransform(struct physics_data_s *physics, float tr[16], uint16_t index) { - if(physics->ghost_objects[index]) + if(physics->ghost_objects && physics->ghost_objects[index]) { physics->ghost_objects[index]->getWorldTransform().setFromOpenGLMatrix(tr); }