e - wl - fix re-adding wl listener twice to the same list

this causes calling the same cb multiple times and this causes mayhem.
fix.
This commit is contained in:
Carsten Haitzler 2021-05-11 03:32:54 +00:00
parent fe499cecff
commit bc8a4f9a89
1 changed files with 2 additions and 0 deletions

View File

@ -1011,6 +1011,8 @@ e_pixmap_image_refresh(E_Pixmap *cp)
cp->held_buffer_destroy_listener.notify =
_e_pixmap_cb_held_buffer_destroy;
if (cp->held_buffer_destroy_listener.link.next)
wl_list_remove(&cp->held_buffer_destroy_listener.link);
wl_signal_add(&cp->held_buffer->destroy_signal,
&cp->held_buffer_destroy_listener);
return EINA_TRUE;