summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5I.c b/src/H5I.c
index f4b308f..51823f3 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2299,10 +2299,12 @@ H5I_register_aux(hid_t id, void *aux_ptr, H5I_free_t free_func)
FUNC_ENTER_NOAPI_NOINIT
- if(NULL != (id_ptr = H5I_find_id(id))) {
- id_ptr->aux_ptr = aux_ptr;
- id_ptr->free_aux = free_func;
- }
+ if(NULL == (id_ptr = H5I_find_id(id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "Invalid ID")
+
+ id_ptr->aux_ptr = aux_ptr;
+ id_ptr->free_aux = free_func;
+
done:
FUNC_LEAVE_NOAPI(ret_value)