aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_winlx.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_init_winlx.c2
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,\