summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5F.c b/src/H5F.c
index ae3443a..00b3083 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -269,13 +269,12 @@ H5Fget_obj_count(hid_t file_id, unsigned types)
H5VL_t *vol_plugin;
void *obj;
- /* get the plugin pointer */
- if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
-
/* get the file object */
if(NULL == (obj = (void *)H5I_object(file_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
+ /* get the plugin pointer */
+ if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
if(H5VL_file_get(obj, vol_plugin, H5VL_FILE_GET_OBJ_COUNT, H5_REQUEST_NULL, &ret_value, types) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get object count in file(s)")