From f81f1d6172066c7b725250ca777f9986a8863db2 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 16 Apr 2014 12:31:44 +0900 Subject: [PATCH] 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 870d6a1732..61fd1837be 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 */