diff options
Diffstat (limited to 'src/mem/ruby/common/DataBlock.hh')
-rw-r--r-- | src/mem/ruby/common/DataBlock.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 7bd92710d..0ab4cfc01 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -29,6 +29,7 @@ #ifndef __MEM_RUBY_COMMON_DATABLOCK_HH__ #define __MEM_RUBY_COMMON_DATABLOCK_HH__ +#include <cassert> #include <iomanip> #include <iostream> @@ -72,6 +73,7 @@ class DataBlock inline void DataBlock::assign(uint8* data) { + assert(data != NULL); if (m_alloc) { delete [] m_data; } |