From adf44821351cc9b72ccf39c5cd628c22ee75fb2f Mon Sep 17 00:00:00 2001 From: "John M. Penn" Date: Tue, 10 Apr 2018 15:34:06 -0500 Subject: [PATCH] Update MemoryManager::delete_var to just issue a warning message when debug_level > 0. ref #595 --- .../MemoryManager/MemoryManager_delete_var.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp b/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp index ed95c93b..ce220a47 100644 --- a/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp +++ b/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp @@ -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; }