return;
MAGIC_CHECK_END();
if (obj->cur.clipper == clip) return;
- if (obj == clip) return;
+ if (obj == clip)
+ {
+ CRIT("Setting clip %p on itself", obj)
+ return;
+ }
+ if (clip->delete_me)
+ {
+ CRIT("Setting deleted object %p as clip obj %p", clip, obj);
+ abort();
+ return;
+ }
+ if (obj->delete_me)
+ {
+ CRIT("Setting object %p as clip to deleted obj %p", clip, obj);
+ abort();
+ return;
+ }
+ if (!obj->layer)
+ {
+ CRIT("No evas surface associated with object (%p)", obj);
+ abort();
+ return;
+ }
+ if ((obj->layer && clip->layer) &&
+ (obj->layer->evas != clip->layer->evas))
+ {
+ CRIT("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas);
+ abort();
+ return;
+ }
+
if (evas_object_intercept_call_clip_set(obj, clip)) return;
// illegal to set anything but a rect as a clip
- /* if (clip->type != o_rect_type) */
- /* { */
- /* ERR("For now a clip on other object than a rectangle is disabled"); */
- /* return; */
- /* } */
+ if (clip->type != o_rect_type)
+ {
+ ERR("For now a clip on other object than a rectangle is disabled");
+ return;
+ }
if (obj->smart.smart)
{
if (obj->smart.smart->smart_class->clip_set)
return EINA_FALSE;
MAGIC_CHECK_END();
- if (src == obj) return EINA_FALSE;
+ if (obj->delete_me)
+ {
+ CRIT("Setting deleted object %p as image source %p", src, obj);
+ abort();
+ return EINA_FALSE;
+ }
+ if (src->delete_me)
+ {
+ CRIT("Setting object %p to deleted image source %p", src, obj);
+ abort();
+ return EINA_FALSE;
+ }
+ if (!src->layer)
+ {
+ CRIT("No evas surface associated with source object (%p)", obj);
+ abort();
+ return EINA_FALSE;
+ }
+ if ((obj->layer && src->layer) &&
+ (obj->layer->evas != src->layer->evas))
+ {
+ CRIT("Setting object %p from Evas (%p) from another Evas (%p)", src, src->layer->evas, obj->layer->evas);
+ abort();
+ return EINA_FALSE;
+ }
+ if (src == obj)
+ {
+ CRIT("Setting object %p as a source for itself", obj);
+ abort();
+ return EINA_FALSE;
+ }
if (o->cur.source == src) return EINA_TRUE;
_evas_object_image_cleanup(obj, o);