From 1878e68558b83bb2d822c298aa7b8373a2bde273 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 8 Jul 2019 13:52:05 -0500 Subject: Move before null check --- java/src/jni/h5lImp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index 7413023..7eee3d4 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -508,11 +508,11 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx UNUSED(clss); + infobuf.type = H5L_TYPE_ERROR; + if (NULL == name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_val_by_idx: group name is NULL"); - infobuf.type = H5L_TYPE_ERROR; - PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Lget_val_by_idx: group name not pinned"); /* Get the length of the link value */ -- cgit v0.12