From 53e9923162ca99cc3059fb0d98ba97371653eb11 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 13 Apr 2014 15:43:01 +0200 Subject: Ignore NULL callbacks in ModuleManager::Reload() Found by Coverity, CID: 1201453 --- src/modmanager_dynamic.cpp | 2 +- src/modmanager_static.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index 7dae49a18..045b488b5 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -179,7 +179,7 @@ void ModuleManager::Reload(Module* mod, HandlerBase1* callback) { if (CanUnload(mod)) ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback)); - else + else if (callback) callback->Call(false); } diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index 8f532ee80..c5b1e1062 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -176,7 +176,7 @@ void ModuleManager::Reload(Module* mod, HandlerBase1* callback) { if (CanUnload(mod)) ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback)); - else + else if (callback) callback->Call(false); } -- cgit v1.2.3