summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 5653209..e1587b9 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -5903,7 +5903,7 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
last_span = NULL;
/* Generate all the span segments for this dimension */
- for(u = 0, stride_iter = 0; u < count[i]; u++, stride_iter += stride[i]) {
+ for(u = 0, stride_iter = 0; u < count[i]; u++, stride_iter += stride[i]) {
H5S_hyper_span_t *span; /* New hyperslab span */
/* Allocate a span node */
@@ -5945,7 +5945,8 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
} /* end for */
/* Indicate that there is a pointer to this tree */
- down->count = 1;
+ if(down)
+ down->count = 1;
/* Success! Return the head of the list in the slowest changing dimension */
ret_value = down;