From e7e0e51fc4de0ecfd5d6aaab6a0e80d957b1f07b Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 8 Jan 2022 07:38:42 +0200 Subject: [PATCH 17/17] Make map_is_known() to behave when player maps have not yet been created Reported by ddeanbrown See osdn #43584 Signed-off-by: Marko Lindqvist --- server/maphand.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/maphand.c b/server/maphand.c index 753c530df9..9a3b83930a 100644 --- a/server/maphand.c +++ b/server/maphand.c @@ -856,6 +856,11 @@ void map_show_all(struct player *pplayer) ****************************************************************************/ bool map_is_known(const struct tile *ptile, const struct player *pplayer) { + if (pplayer->tile_known.vec == NULL) { + /* Player map not initialized yet */ + return FALSE; + } + return dbv_isset(&pplayer->tile_known, tile_index(ptile)); } -- 2.34.1