diff options
author | Thomas White <weiss@jade.(none)> | 2008-08-11 13:07:43 +0100 |
---|---|---|
committer | Thomas White <weiss@jade.(none)> | 2008-08-11 13:07:43 +0100 |
commit | a4f631336e4f8816d4a58edd2c962cccee94c3a6 (patch) | |
tree | 9a2e085b7926ec61ba023cf867965ba5425e13f4 /src/physics.c | |
parent | efe08407f3083ca55916cc91cd5a2b9d743ff754 (diff) |
Subdivision fixes
Diffstat (limited to 'src/physics.c')
-rw-r--r-- | src/physics.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/physics.c b/src/physics.c index 7b6b2b7..08295a9 100644 --- a/src/physics.c +++ b/src/physics.c @@ -238,8 +238,10 @@ static int physics_collision_room(ModelInstance *obj, Game *game, double dt, Col if ( room != NULL ) { int j; for ( j=0; j<room->num_objects; j++ ) { - if ( physics_check_collide(obj, room->objects[j], dt, coll, room, game) ) { - found = 1; + if ( room->objects[j] != NULL ) { + if ( physics_check_collide(obj, room->objects[j], dt, coll, room, game) ) { + found = 1; + } } } } |