jpeg pushed a commit to branch master.

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

commit 40029ce70a7b57352e7070825bf8b15490f2d2e8
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jul 12 10:43:07 2017 +0900

    eo: Don't resolve function calls for NULL objects
    
    eo_function(NULL) always leads to a no-operation. A this
    point it is basically considered the normal operation
    with EO to just silently ignore NULL errors.
    
    If the API function "eo_function" belongs to a class that
    has not been loaded yet (eg. no object of this type has
    been created yet), then the op associated to the API func
    may not be defined yet.
    
    Fixes T5715
---
 src/lib/eo/eo.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index e4f767b687..2345fd3196 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -691,8 +691,12 @@ _efl_object_api_op_id_get(const void *api_func)
 EAPI Efl_Object_Op
 _efl_object_op_api_id_get(const void *api_func, const Eo *obj, const char 
*api_func_name, const char *file, int line)
 {
-   Efl_Object_Op op = _efl_object_api_op_id_get_internal(api_func);
+   Efl_Object_Op op;
 
+#ifndef EO_DEBUG
+   if (!obj) return EFL_NOOP;
+#endif
+   op = _efl_object_api_op_id_get_internal(api_func);
    if (op == EFL_NOOP)
      {
         eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR,

-- 


Reply via email to