Skip to content

Commit

Permalink
fixed game crash if unitialized ghosts are updated;
Browse files Browse the repository at this point in the history
  • Loading branch information
TeslaRus committed Jul 14, 2016
1 parent 59bdade commit 509c8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/physics_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 509c8db

Please sign in to comment.