diff --git a/src/utils/destroy_utils.c b/src/utils/destroy_utils.c index b098afa..7d2298a 100644 --- a/src/utils/destroy_utils.c +++ b/src/utils/destroy_utils.c @@ -6,7 +6,7 @@ /* By: kcolin +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/08/18 13:05:31 by kcolin #+# #+# */ -/* Updated: 2025/09/08 17:02:43 by tchampio ### ########.fr */ +/* Updated: 2025/09/10 15:18:58 by tchampio ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,6 +25,7 @@ void destroy_texture(t_cub3d_data *data, t_img_data *data_img) void destroy_textures(t_cub3d_data *data) { + int i; if (data->no_texture) mlx_destroy_image(data->mlx, data->no_texture->img); free(data->no_texture); @@ -37,6 +38,9 @@ void destroy_textures(t_cub3d_data *data) if (data->we_texture) mlx_destroy_image(data->mlx, data->we_texture->img); free(data->we_texture); + i = 0; + while (i < 7) + destroy_texture(data, data->barricades_texture[i++]); } void destroy_sprites(t_cub3d_data *data)