summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5R.c b/src/H5R.c
index b9240bd..ec821ab 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -409,6 +409,10 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
"internal error (unknown reference type)");
} /* end switch */
+ /* Check to make certain that this object hasn't been deleted since the reference was created */
+ if(H5O_link(&ent,0)<=0)
+ HRETURN_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, FAIL, "dereferencing deleted object");
+
/* Open the dataset object */
oid_type=H5G_get_type(&ent);
switch(oid_type) {