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 ) {
if (address == 0) {
std::stringstream message;
message << "Cannot delete memory at NULL.";
emitError(message.str());
if (debug_level) {
std::stringstream message;
message << "Cannot delete memory at NULL.";
emitWarning(message.str());
}
return 1;
}