diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 18:19:20 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 18:19:20 +0100 |
commit | 4286b43e9e35242b03f5a38af1099f77901c0b3e (patch) | |
tree | 6ee93930d83e24f047cbd72dbfbcbd8ebfa14dfc /src/ft_init_winlx.c | |
parent | Added a second map for error management (diff) | |
download | 42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.gz 42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.bz2 42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.xz 42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.zst 42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.zip |
Much cleaner
Diffstat (limited to '')
-rw-r--r-- | src/ft_init_winlx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c index 0e272fd..a4b7208 100644 --- a/src/ft_init_winlx.c +++ b/src/ft_init_winlx.c @@ -6,8 +6,10 @@ int ft_init_winlx(t_win *wlist) { + ft_memdel(wlist->wlx); if (!(wlist->wlx = mlx_init())) return (-1); + ft_memdel(wlist->winptr); if (!(wlist->winptr = (void*)malloc(wlist->x_size * wlist->y_size))) return (-1); if (!(wlist->winptr = mlx_new_window(wlist->wlx, wlist->x_size,\ |