zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f174bf2eb23c4353f907e991ab871b5f191de48e

commit f174bf2eb23c4353f907e991ab871b5f191de48e
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Mon Oct 14 09:29:43 2019 -0400

    evas/smart: print actual errors when smart api functions are called on 
non-smarts
    
    Summary:
    this is an error, and it should be printed
    Depends on D10355
    
    Reviewers: cedric
    
    Reviewed By: cedric
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D10356
---
 src/lib/evas/canvas/evas_object_smart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_smart.c 
b/src/lib/evas/canvas/evas_object_smart.c
index 7950545507..f45f12e666 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -11,7 +11,7 @@
 
 #define EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, ...) \
    Evas_Smart_Data *o = efl_data_scope_safe_get(eo_obj, MY_CLASS); \
-   do { if (!o) { MAGIC_CHECK_FAILED(eo_obj,0,MAGIC_SMART) return __VA_ARGS__; 
} } while (0)
+   do { if (!o) { ERR("calling smart object API on non-smart object!"); return 
__VA_ARGS__; } } while (0)
 
 extern Eina_Hash* signals_hash_table;
 
@@ -1615,7 +1615,7 @@ evas_object_smart_cleanup(Evas_Object *eo_obj)
           }
 
         evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
-        evas_object_smart_data_set(eo_obj, NULL);
+        if (o->data) evas_object_smart_data_set(eo_obj, NULL);
      }
 
    obj->smart.parent = NULL;

-- 


Reply via email to