home · contact · privacy
Server: Fix segfault when parsing THINGS_HERE on player sans .fov_map.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 6 Feb 2015 00:00:56 +0000 (01:00 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 6 Feb 2015 00:00:56 +0000 (01:00 +0100)
src/server/run.c

index 38dc5a04174edc6b68832f227cbb40f9a7a2ac8d..c160e9fcea3d19900f1e9a7d6dabb285a88952c1 100644 (file)
@@ -222,7 +222,8 @@ static uint8_t parse_command_meta(char * tok0)
             }
             send_to_outfile("THINGS_HERE START\n", 1);
             struct Thing * player = get_player();
-            if ('v' == player->fov_map[atoi(tok1)*world.map.length+atoi(tok2)])
+            if (player->fov_map &&
+                'v' == player->fov_map[atoi(tok1)*world.map.length+atoi(tok2)])
             {
                 struct Thing * t;
                 for (t = world.things; t; t = t->next)