summaryrefslogtreecommitdiffstats
path: root/src/H5FDdirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDdirect.c')
-rw-r--r--src/H5FDdirect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 35da1f1..367a613 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -233,8 +233,11 @@ H5FD_direct_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- if (H5I_VFL != H5I_get_type(H5FD_DIRECT_g))
+ if (H5I_VFL != H5I_get_type(H5FD_DIRECT_g)) {
H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g, sizeof(H5FD_class_t), FALSE);
+ if (H5I_INVALID_HID == H5FD_DIRECT_g)
+ HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register direct");
+ }
/* Set return value */
ret_value = H5FD_DIRECT_g;