summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_main.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-26 11:46:49 +0000
committerTom Hacohen <tom@stosb.com>2013-11-26 11:48:25 +0000
commitbb4a19b5ad6a8fc6720154700aabfa32f4b71244 (patch)
tree4b68a26cb0b0435ba52ef8d61503f8770972ed3c /src/lib/evas/canvas/evas_main.c
parentbff48f92a3de2f92b81f7cc45f1c32f57e34dca6 (diff)
Evas layer: Fix deletion of canvas with still-refed objects.
This fixes the infinite loop while deleting canvases with still referenced objects. The canvas should not assume it can get rid of all of the objects. Some objects might be referenced. I also added a printf to let the user know about it. This fixes T565.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 60c23afd71..185b4a539e 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -233,8 +233,11 @@ _destructor(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
233 { 233 {
234 if (!o->delete_me) 234 if (!o->delete_me)
235 { 235 {
236 if (o->ref > 0) 236 if ((o->ref > 0) || (eo_ref_get(o->object) > 0))
237 ERR("obj(%p, %s) ref count(%d) is bigger than 0. This object couldn't be deleted", o, o->type, o->ref); 237 {
238 ERR("obj(%p, %s) ref count(%d) is bigger than 0. This object couldn't be deleted", o, o->type, eo_ref_get(o->object));
239 continue;
240 }
238 del = EINA_TRUE; 241 del = EINA_TRUE;
239 } 242 }
240 } 243 }