summaryrefslogtreecommitdiffstats
path: root/hl/src/H5TB.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-09-29 16:23:57 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-09-29 16:23:57 (GMT)
commit9140500b86f1143e9d0684db553d796271bffc14 (patch)
treeebfc0882283c40207f6683024dac3f477a428298 /hl/src/H5TB.c
parent17893b24ea87ae013d88ab280e262cbde00e2815 (diff)
downloadhdf5-9140500b86f1143e9d0684db553d796271bffc14.zip
hdf5-9140500b86f1143e9d0684db553d796271bffc14.tar.gz
hdf5-9140500b86f1143e9d0684db553d796271bffc14.tar.bz2
[svn-r25631] Fix fo HDFFV-8912
Diffstat (limited to 'hl/src/H5TB.c')
-rw-r--r--hl/src/H5TB.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index 7856d5f..1ca41a8 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -982,7 +982,7 @@ herr_t H5TBread_fields_name(hid_t loc_id,
if((mem_type_id = H5Tcreate(H5T_COMPOUND, type_size)) < 0)
goto out;
- /* iterate tru the members */
+ /* iterate through the members */
for(i = 0, j = 0; i < nfields; i++) {
/* get the member name */
if(NULL == (member_name = H5Tget_member_name(ftype_id, (unsigned)i)))
@@ -1028,6 +1028,10 @@ herr_t H5TBread_fields_name(hid_t loc_id,
member_name = NULL;
} /* end for */
+ /* check to make sure field was found, no reason to continue if it does not exist */
+ if(j == 0)
+ goto out;
+
/* get the dataspace handle */
if((sid = H5Dget_space(did)) < 0)
goto out;