summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
}