apparently we get a 0 tile from time to time, no idea yet why
authorMatthias Braun <matze@braunis.de>
Thu, 29 Apr 2004 13:54:21 +0000 (13:54 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 29 Apr 2004 13:54:21 +0000 (13:54 +0000)
SVN-Revision: 842

src/collision.cpp

index fc7a902..2f41fed 100644 (file)
@@ -56,7 +56,7 @@ bool collision_object_map(const base_type& base)
   for(int x = starttilex; x*32 < max_x; ++x) {
     for(int y = starttiley; y*32 < max_y; ++y) {
       Tile* tile = tilemanager.get(level.get_tile_at(x, y));
   for(int x = starttilex; x*32 < max_x; ++x) {
     for(int y = starttiley; y*32 < max_y; ++y) {
       Tile* tile = tilemanager.get(level.get_tile_at(x, y));
-      if(tile->solid)
+      if(tile && tile->solid)
         return true;
     }
   }
         return true;
     }
   }