summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5lImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5lImp.c')
-rw-r--r--java/src/jni/h5lImp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c
index ac71845..f1734fd 100644
--- a/java/src/jni/h5lImp.c
+++ b/java/src/jni/h5lImp.c
@@ -574,8 +574,12 @@ H5L_iterate_cb
constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "<init>", "(IZJIJ)V");
if (constructor != 0) {
cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args);
-
- status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data);
+ if (cb_info_t == NULL) {
+ printf("FATAL ERROR: hdf/hdf5lib/structs/H5L_info_t: Creation failed\n");
+ }
+ else {
+ status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data);
+ }
} /* end if */
} /* end if */
} /* end if */