summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5AC.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 722b709..5f22c7b 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -311,7 +311,14 @@ H5AC_compare(const void *_a, const void *_b)
assert(current_cache_g);
- if (NULL == current_cache_g->slot[a]->type) {
+ if(NULL==current_cache_g->slot[a]) {
+ if (NULL == current_cache_g->slot[b]) {
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ else if (NULL == current_cache_g->slot[a]->type) {
if (NULL == current_cache_g->slot[b]->type) {
return 0;
} else {
@@ -412,7 +419,7 @@ H5AC_flush(H5F_t *f, const H5AC_class_t *type, haddr_t addr, hbool_t destroy)
if (NULL == (*info))
continue;
#endif
- if ((*info) || type == (*info)->type) {
+ if (!type || type == (*info)->type) {
flush = (*info)->type->flush;
status = (flush)(f, destroy, (*info)->addr, (*info));
if (status < 0) {