SafeArray: add a null pointer check

Thanks @ghost for the report.

Close issue #327
This commit is contained in:
Gregory Hainaut 2014-12-21 12:49:02 +01:00
parent 0b77f93154
commit b24c76f12a
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ T* SafeArray<T>::_virtual_realloc( int newsize )
realloc( m_ptr, newsize * sizeof(T) )
);
if( IsDebugBuild )
if( IsDebugBuild && (retval != NULL))
{
// Zero everything out to 0xbaadf00d, so that its obviously uncleared
// to a debuggee