summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5O.c b/src/H5O.c
index c160d3e..02778de 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1662,7 +1662,10 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
/* check args */
HDassert(loc);
HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
+
+ /* Check for valid address */
+ if(!H5F_addr_defined(loc->addr))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined")
/* Check for write access on the file */
file_intent = H5F_INTENT(loc->file);