summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:21 (GMT)
commit678e6cc40f97cc9bf0f9cfa6c710f0103139177d (patch)
tree6871d36da77d9b6dc9c734080fe85d944eac636e
parent2181808f9e7d67f408b55f9f1df9633789e626ab (diff)
downloadhdf5-678e6cc40f97cc9bf0f9cfa6c710f0103139177d.zip
hdf5-678e6cc40f97cc9bf0f9cfa6c710f0103139177d.tar.gz
hdf5-678e6cc40f97cc9bf0f9cfa6c710f0103139177d.tar.bz2
[svn-r13124] Description:
Add extra protection for sanity checks, when assertions are enabled. Tested on: Linux/32 2.6 (chicago)
-rw-r--r--src/H5FDlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 1c46b29..0c513f1 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -1210,8 +1210,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)