summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-04-23 22:09:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-04-23 22:09:25 (GMT)
commita648d47c9093d00cafd217f462d6db7d5bde7b4e (patch)
treeeb69e2c3a87e9b4e74f8d28d4681132f7a1679c8 /src/H5P.c
parent87f0d37a7677260d4ae4762fdbe0fe97d9df2e15 (diff)
downloadhdf5-a648d47c9093d00cafd217f462d6db7d5bde7b4e.zip
hdf5-a648d47c9093d00cafd217f462d6db7d5bde7b4e.tar.gz
hdf5-a648d47c9093d00cafd217f462d6db7d5bde7b4e.tar.bz2
[svn-r1213] Added better error message for attemping to close a default property list.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 2bbc54c..e6b871e 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -272,9 +272,10 @@ H5Pclose(hid_t plist_id)
H5TRACE1("e","i",plist_id);
/* Check arguments */
- if ((type=H5P_get_class (plist_id))<0 ||
- NULL==(plist=H5I_object (plist_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ if (plist_id==H5P_DEFAULT)
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't close predefined object");
+ if ((type=H5P_get_class (plist_id))<0 || NULL==(plist=H5I_object (plist_id))) {
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
}
/*