summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 35773df..0c42dc6 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1577,7 +1577,8 @@ H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, void *op_data)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
- *attr_num = (unsigned)last_attr;
+ if(attr_num)
+ *attr_num = (unsigned)last_attr;
done:
FUNC_LEAVE_API(ret_value)