forked from enlightenment/efl
Eo callbacks: Fix a possible issue of corrupted callback list.
This happens when we delete more than one callback at the beginning of the list (i.e 2 or more) in one go.
This commit is contained in:
parent
f5d4a807c8
commit
104a57b58a
|
@ -425,8 +425,6 @@ _eo_callback_remove(Private_Data *pd, Eo_Callback_Description *cb)
|
|||
Eo_Callback_Description *itr, *pitr = NULL;
|
||||
|
||||
itr = pd->callbacks;
|
||||
if (pd->callbacks == cb)
|
||||
pd->callbacks = cb->next;
|
||||
|
||||
for ( ; itr ; )
|
||||
{
|
||||
|
@ -439,6 +437,10 @@ _eo_callback_remove(Private_Data *pd, Eo_Callback_Description *cb)
|
|||
{
|
||||
pitr->next = titr->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
pd->callbacks = titr->next;
|
||||
}
|
||||
free(titr);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue