Removes an unnecessary warning in MemoryManager::free

Removes the warning "MemoryManager: Null pointer deallocation attempted"
from MemoryManager. The warning does not make sense because
deallocations of null pointers are ok in C++.

Fixes #2023.
This commit is contained in:
Michael Gregorius
2015-10-10 22:08:31 +02:00
parent 3a8f491ddb
commit cb6b3bd906

View File

@@ -105,10 +105,9 @@ void * MemoryManager::alloc( size_t size )
void MemoryManager::free( void * ptr )
{
if( ptr == NULL )
if( !ptr )
{
qDebug( "MemoryManager: Null pointer deallocation attempted" );
return; // let's not try to deallocate null pointers, ok?
return; // Null pointer deallocations are OK but do not need to be handled
}
// fetch info on the ptr and remove