summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-04-13 15:43:01 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-04-13 15:43:01 +0200
commit53e9923162ca99cc3059fb0d98ba97371653eb11 (patch)
tree77ccdf661c9582d8d1d5994c6627b54b0a0d7fd0 /src
parent2334ebd9273bf7f9751a723a6196efb222997185 (diff)
Ignore NULL callbacks in ModuleManager::Reload()
Found by Coverity, CID: 1201453
Diffstat (limited to 'src')
-rw-r--r--src/modmanager_dynamic.cpp2
-rw-r--r--src/modmanager_static.cpp2
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<void, bool>* 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<void, bool>* callback)
{
if (CanUnload(mod))
ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback));
- else
+ else if (callback)
callback->Call(false);
}