summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-03-24 21:03:52 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-03-24 21:03:52 (GMT)
commit370a4f930f5a4af3f5866b231b5b799db4506250 (patch)
tree222c3552e300668d5e7eb9a9a5d00b267776e96d /src/H5Sselect.c
parent7d709797fc7625e646f05702ced307d2ca81a63f (diff)
downloadhdf5-370a4f930f5a4af3f5866b231b5b799db4506250.zip
hdf5-370a4f930f5a4af3f5866b231b5b799db4506250.tar.gz
hdf5-370a4f930f5a4af3f5866b231b5b799db4506250.tar.bz2
[svn-r8276] *** empty log message ***
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index a52bb12..1150e5b 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -146,6 +146,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src)
/* Perform correct type of copy based on the type of selection */
switch (src->extent.type) {
+ case H5S_NULL:
case H5S_SCALAR:
/*nothing needed */
break;
@@ -251,6 +252,9 @@ H5Sget_select_npoints(hid_t spaceid)
if (NULL == (space=H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
+ if (space->extent.type == H5S_NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace");
+
ret_value = H5S_get_select_npoints(space);
done:
@@ -325,6 +329,9 @@ H5Sselect_valid(hid_t spaceid)
if (NULL == (space=H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataspace");
+ if (space->extent.type == H5S_NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace");
+
ret_value = H5S_select_valid(space);
done: