-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexit.c
33 lines (29 loc) · 1.15 KB
/
exit.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* exit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: conguyen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/22 10:56:18 by conguyen #+# #+# */
/* Updated: 2022/03/22 11:41:36 by conguyen ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
int exit_fdf(t_fdf *fdf)
{
mlx_destroy_image(fdf->mlx.mlx, fdf->mlx.img);
mlx_destroy_window(fdf->mlx.mlx, fdf->mlx.win);
exit (0);
}
void error_exit(char **lines)
{
int x;
x = 0;
while (lines[x] != NULL)
{
free(lines[x++]);
}
free(lines);
exit (0);
}