Enlightenment CVS committal Author : moom16 Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: etk_object.c Log Message: * Stop calling the notification callbacks if the object is destroyed by a notification callback when a property is modified =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_object.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- etk_object.c 4 Mar 2006 19:48:20 -0000 1.18 +++ etk_object.c 4 Mar 2006 22:38:21 -0000 1.19 @@ -451,18 +451,26 @@ Evas_List *l; Evas_List **notification_callbacks; Etk_Notification_Callback *callback; + void *object_ptr; if (!object || !property_name) return; if (!(notification_callbacks = evas_hash_find(object->notification_callbacks_hash, property_name))) return; + object_ptr = object; + etk_object_weak_pointer_add(object, &object_ptr); for (l = *notification_callbacks; l; l = l->next) { callback = l->data; if (callback->callback) callback->callback(object, property_name, callback->data); + + /* The object has been destroyed */ + if (!object_ptr) + return; } + etk_object_weak_pointer_remove(object, &object_ptr); } /** ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs