From: Christian Heller Date: Fri, 6 Feb 2015 00:00:56 +0000 (+0100) Subject: Server: Fix segfault when parsing THINGS_HERE on player sans .fov_map. X-Git-Tag: tce~543 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/do_tasks?a=commitdiff_plain;h=0bc5f963f66050ed0018bf1228f5b17c686457c0;p=plomrogue Server: Fix segfault when parsing THINGS_HERE on player sans .fov_map. --- diff --git a/src/server/run.c b/src/server/run.c index 38dc5a0..c160e9f 100644 --- a/src/server/run.c +++ b/src/server/run.c @@ -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)