From 4f0340591f868db0a29ec872a2f88e49231d007b Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 12 Jun 2012 16:26:47 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@72041 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_smart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/canvas/evas_object_smart.c b/src/lib/canvas/evas_object_smart.c index 973ce77..18cb4f1 100644 --- a/src/lib/canvas/evas_object_smart.c +++ b/src/lib/canvas/evas_object_smart.c @@ -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; } -- 2.7.4