emersion / mako

A lightweight Wayland notification daemon
https://wayland.emersion.fr/mako
MIT License
2.17k stars 137 forks source link

Avoid invalid frame callbacks #492

Closed MikeWalrus closed 7 months ago

MikeWalrus commented 8 months ago

surface->frame_callback could have already been destroyed in layer_surface_handle_closed, and calling wl_callback_destory with NULL segfaults.

Also, the frame callback should be destroyed in destroy_surface, otherwise the surface can be used in the callback after being freed.

Fixes #493.