From 438f18be9913013aed85dc88c460c40d60bf6455 Mon Sep 17 00:00:00 2001 From: Haliris <97298717+Haliris@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:20:55 +0200 Subject: [PATCH] Fixes accidental textdata initalization removal in parser.c --- srcs/parser/parser.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/srcs/parser/parser.c b/srcs/parser/parser.c index d5d0c0c..064997c 100644 --- a/srcs/parser/parser.c +++ b/srcs/parser/parser.c @@ -85,8 +85,17 @@ t_parse_status verify_map(char **map, t_data *data) int parse_map(t_data *data) { data->map = build_map(data); + close(data->map_fd); if (!data->map) return (PANIC); + data->textures = get_textures_info(data->map_path, data); + if (!data->textures) + { + close(data->map_fd); + ft_putstr_fd("Error\n", STDERR_FILENO); + return (ft_free_all(data->map), PANIC); + } + close(data->map_fd); if (verify_map(data->map, data) == MAP_ERR) { ft_putstr_fd("Error\n", STDERR_FILENO);