aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/map.c b/map.c
index 3d89efc..d17c019 100644
--- a/map.c
+++ b/map.c
@@ -183,7 +183,7 @@ void draw_map(Map map, size_t width, size_t height, int offset_x, int offset_y,
int color_pair = 0; /* The color pair of the current char */
switch (map[i][j]) {
case EMPTY:
- if (visited[i][j])
+ if (visited != NULL && visited[i][j])
color_pair = COLOR_PAIR(VISITED_COLOR);
else
color_pair = COLOR_PAIR(EMPTY_COLOR);