Calling mlx_destroy_window through DestroyNotify hook causes invalid read. This is happening in this snippet:
https://github.com/42Paris/minilibx-linux/blob/7dc53a411a7d4ae286c60c6229bd1e395b0efb82/mlx_loop.c#L53-L56
I think this is caused by the check of win->hooks[ev.type].hook at line 55 after win is freed in the previous line.