core: remove destroy listener after fired

This commit is contained in:
Vaxry 2024-04-20 14:26:26 +01:00
parent 7f6cc01d02
commit 9e13e09152
1 changed files with 2 additions and 0 deletions

View File

@ -568,6 +568,8 @@ static const wl_message {}[] = {{
void {}::onDestroyCalled() {{
wl_resource_set_user_data(pResource, nullptr);
wl_list_remove(&resourceDestroyListener.link);
wl_list_init(&resourceDestroyListener.link);
if (onDestroy)
onDestroy(this);