summaryrefslogtreecommitdiffstats
path: root/src/H5Tprecis.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tprecis.c')
-rw-r--r--src/H5Tprecis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 59bac8b..bd28fc2 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -154,6 +154,8 @@ H5Tset_precision(hid_t type_id, size_t prec)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only")
+ if (NULL != dt->vol_obj)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is committed")
if (prec == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)