raster pushed a commit to branch master.

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

commit f81f1d6172066c7b725250ca777f9986a8863db2
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Apr 16 12:31:44 2014 +0900

    eo - let's make NULL objects simply debug warnings, not errors.
    
    due to recent changes a lot of objects are now NULL (correctly) and eo
    complains on access of them. it's simply too noisy adding too many
    if's all through code, so let's just make eo be sensible here.
---
 src/lib/eo/eo_ptr_indirection.x | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 870d6a1..61fd183 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -266,6 +266,13 @@ _eo_obj_pointer_get(const Eo_Id obj_id)
    Generation_Counter generation;
    Table_Index mid_table_id, table_id, entry_id;
 
+   // NULL objects will just be sensibly ignored. not worth complaining
+   // every single time.
+   if (!obj_id)
+     {
+        DBG("obj_id is NULL. Possibly unintended access?");
+        return NULL;
+     }
    EO_DECOMPOSE_ID(obj_id, mid_table_id, table_id, entry_id, generation);
 
    /* Check the validity of the entry */

-- 


Reply via email to