summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:57 (GMT)
commit15b28ad04ab6894cfd308d7855798b6ed82305bc (patch)
tree88a13218bf1113befc1670e131335bc15d8b7a7d /src
parentee6036e0321ecbb5c4b87fa4fd01942360fbbd18 (diff)
downloadhdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.zip
hdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.tar.gz
hdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.tar.bz2
[svn-r13125] Description:
Add extra protection for sanity checks, when assertions are enabled. Tested on: Linux/32 2.6 (chicago)
Diffstat (limited to 'src')
-rw-r--r--src/H5FDlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index c317355..06212e8 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -1161,8 +1161,10 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
assert(buf);
/* Verify that we are writing out the type of data we allocated in this location */
- assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[addr] || (H5FD_mem_t)file->flavor[addr]==H5FD_MEM_DEFAULT);
- assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[(addr+size)-1] || (H5FD_mem_t)file->flavor[(addr+size)-1]==H5FD_MEM_DEFAULT);
+ if(file->flavor) {
+ assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[addr] || (H5FD_mem_t)file->flavor[addr]==H5FD_MEM_DEFAULT);
+ assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[(addr+size)-1] || (H5FD_mem_t)file->flavor[(addr+size)-1]==H5FD_MEM_DEFAULT);
+ } /* end if */
/* Check for overflow conditions */
if (HADDR_UNDEF==addr)