summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 91c8b1a..6dc7ef3 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -564,8 +564,8 @@ H5I_get_type(hid_t id)
FUNC_ENTER(H5I_get_type, H5I_BADID);
- ret_value = H5I_GROUP(id);
- assert(ret_value>H5I_BADID && ret_value<H5I_MAXID);
+ if (id>0) ret_value = H5I_GROUP(id);
+ assert(ret_value>=H5I_BADID && ret_value<H5I_MAXID);
FUNC_LEAVE(ret_value);
}