actually getting smart data should safely retunr NULL if not a smart

object type without bitching. this is a quick "is it a alid smart
object" check.



SVN revision: 72041
This commit is contained in:
Carsten Haitzler 2012-06-12 16:26:47 +00:00
parent c3fe7b3aa8
commit f3c3450dd8
1 changed files with 1 additions and 3 deletions

View File

@ -96,9 +96,7 @@ evas_object_smart_data_get(const Evas_Object *obj)
MAGIC_CHECK_END();
o = (Evas_Object_Smart *)(obj->object_data);
if (!o) return NULL;
MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
return NULL;
MAGIC_CHECK_END();
if (o->magic != MAGIC_OBJ_SMART) return NULL;
return o->data;
}