From 348c700fedae3b0005660d8c42941fe7c69027d4 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sun, 22 Mar 2026 11:26:51 +0300 Subject: Handle when visited == NULL in draw_map() --- map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'map.c') 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); -- cgit v1.2.3