summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5L.c2
-rw-r--r--test/links.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 86a2e80..11bf313 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -2372,7 +2372,7 @@ H5L_delete_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(udata->dxpl_id, obj_loc->oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(udata->dxpl_id, (obj_loc) ? (obj_loc->oloc->addr) : HADDR_UNDEF, FAIL)
/* Check if the name of the group resolved to a valid object */
if(obj_loc == NULL)
diff --git a/test/links.c b/test/links.c
index f1e6daa..09c2d4d 100644
--- a/test/links.c
+++ b/test/links.c
@@ -11422,6 +11422,12 @@ delete_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
+ /* Check for deletion on non-existing group */
+ H5E_BEGIN_TRY {
+ ret = H5Ldelete_by_idx(group_id, "None", idx_type, order, (hsize_t)0, H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(ret >= 0) TEST_ERROR
+
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
hid_t group_id2; /* Group ID */