summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-08-07 10:59:44 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-07 10:59:44 +0000
commit6e0f9db0899a8aa3e858c70880154a201e392a2a (patch)
treefc1d8cce0f76d4851cfddd95105793352cc4ecad /legacy
parent1284e077ad3480c59c7dbe76ff4be666e71e9704 (diff)
lets not segv if src is null :)
SVN revision: 74978
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_image.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c
index 9c4a2d9209..743c9a232f 100644
--- a/legacy/evas/src/lib/canvas/evas_object_image.c
+++ b/legacy/evas/src/lib/canvas/evas_object_image.c
@@ -453,30 +453,33 @@ evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
453 abort(); 453 abort();
454 return EINA_FALSE; 454 return EINA_FALSE;
455 } 455 }
456 if (src->delete_me) 456 if (src)
457 {
458 CRIT("Setting object %p to deleted image source %p", src, obj);
459 abort();
460 return EINA_FALSE;
461 }
462 if (!src->layer)
463 {
464 CRIT("No evas surface associated with source object (%p)", obj);
465 abort();
466 return EINA_FALSE;
467 }
468 if ((obj->layer && src->layer) &&
469 (obj->layer->evas != src->layer->evas))
470 {
471 CRIT("Setting object %p from Evas (%p) from another Evas (%p)", src, src->layer->evas, obj->layer->evas);
472 abort();
473 return EINA_FALSE;
474 }
475 if (src == obj)
476 { 457 {
477 CRIT("Setting object %p as a source for itself", obj); 458 if (src->delete_me)
478 abort(); 459 {
479 return EINA_FALSE; 460 CRIT("Setting object %p to deleted image source %p", src, obj);
461 abort();
462 return EINA_FALSE;
463 }
464 if (!src->layer)
465 {
466 CRIT("No evas surface associated with source object (%p)", obj);
467 abort();
468 return EINA_FALSE;
469 }
470 if ((obj->layer && src->layer) &&
471 (obj->layer->evas != src->layer->evas))
472 {
473 CRIT("Setting object %p from Evas (%p) from another Evas (%p)", src, src->layer->evas, obj->layer->evas);
474 abort();
475 return EINA_FALSE;
476 }
477 if (src == obj)
478 {
479 CRIT("Setting object %p as a source for itself", obj);
480 abort();
481 return EINA_FALSE;
482 }
480 } 483 }
481 if (o->cur.source == src) return EINA_TRUE; 484 if (o->cur.source == src) return EINA_TRUE;
482 485
@@ -485,10 +488,7 @@ evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
485 if (o->cur.file || o->cur.key) 488 if (o->cur.file || o->cur.key)
486 evas_object_image_file_set(obj, NULL, NULL); 489 evas_object_image_file_set(obj, NULL, NULL);
487 490
488 if (src) 491 if (src) _proxy_set(obj, src);
489 {
490 _proxy_set(obj, src);
491 }
492 492
493 return EINA_TRUE; 493 return EINA_TRUE;
494} 494}