Skip to content

Invalid read on DestroyNotify #58

@Kycilak

Description

@Kycilak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions