Update MemoryManager::delete_var to just issue a warning message when debug_level > 0. ref #595

This commit is contained in:
John M. Penn 2018-04-10 15:34:06 -05:00
parent f3be6c9ec0
commit adf4482135

View File

@ -9,9 +9,11 @@
int Trick::MemoryManager::delete_var(void* address, bool destroy ) { int Trick::MemoryManager::delete_var(void* address, bool destroy ) {
if (address == 0) { if (address == 0) {
std::stringstream message; if (debug_level) {
message << "Cannot delete memory at NULL."; std::stringstream message;
emitError(message.str()); message << "Cannot delete memory at NULL.";
emitWarning(message.str());
}
return 1; return 1;
} }