diff --git a/src/mod/loggers/mod_console/mod_console.c b/src/mod/loggers/mod_console/mod_console.c index f1a6346d74..4ac18d7448 100644 --- a/src/mod/loggers/mod_console/mod_console.c +++ b/src/mod/loggers/mod_console/mod_console.c @@ -342,7 +342,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_console_shutdown) { switch_log_unbind_logger(switch_console_logger); - switch_core_hash_destroy(&log_hash); + if (log_hash) { + switch_core_hash_destroy(&log_hash); + } RUNNING = 0; return SWITCH_STATUS_UNLOAD;