e client vol - fix del-self in a del while deleting self...

enlightenment-0.24
Carsten Haitzler 3 years ago
parent 3524bc167c
commit e78c8b6b5f
  1. 3
      src/bin/e_client_volume.c
  2. 1
      src/bin/e_client_volume.h

@ -177,6 +177,8 @@ e_client_volume_sink_del(E_Client_Volume_Sink *sink)
{
E_Client *ec;
if (sink->in_del > 0) return;
sink->in_del++;
EINA_LIST_FREE(sink->clients, ec)
{
ec->sinks = eina_list_remove(ec->sinks, sink);
@ -185,6 +187,7 @@ e_client_volume_sink_del(E_Client_Volume_Sink *sink)
E_EVENT_CLIENT_VOLUME_SINK_DEL);
e_object_unref(E_OBJECT(ec));
}
sink->in_del--;
free(sink);
}

@ -26,6 +26,7 @@ struct _E_Client_Volume_Sink
E_Client_Volume_Sink_Name_Get func_name_get;
void *data;
Eina_List *clients;
int in_del;
};
struct _E_Event_Client_Volume_Sink

Loading…
Cancel
Save