From 68a1f1941acdbde01a06983b7cb46624a2578abb Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 14 Apr 2014 10:34:57 +0100 Subject: [PATCH] Eo: Fix class checking. Without this patch, NULL, and random garbage are detected as classes. This fixes is. --- src/lib/eo/eo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index d207f20..a6c356a 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -147,7 +147,8 @@ _eo_is_a_class(const Eo *eo_id) if (!eo_id) return EINA_FALSE; oid = ((Eo_Base *) eo_id)->id; #endif - return (((oid >> REF_TAG_SHIFT) & 0x1) == 0x0); + return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && + (oid & MASK_CLASS_TAG)); } static inline _Eo_Class * -- 2.7.4