summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands/cmd_reloadmodule.cpp2
-rw-r--r--src/modules/m_globalload.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/cmd_reloadmodule.cpp b/src/commands/cmd_reloadmodule.cpp
index 81ecce1cb..eac364f0e 100644
--- a/src/commands/cmd_reloadmodule.cpp
+++ b/src/commands/cmd_reloadmodule.cpp
@@ -66,7 +66,7 @@ CmdResult CommandReloadmodule::Handle (const std::vector<std::string>& parameter
Module* m = ServerInstance->Modules->Find(parameters[0]);
if (m)
{
- ServerInstance->Modules->Reload(m, new ReloadModuleWorker(user->uuid, parameters[0]));
+ ServerInstance->Modules->Reload(m, (creator->dying ? NULL : new ReloadModuleWorker(user->uuid, parameters[0])));
return CMD_SUCCESS;
}
else
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 9e0ec7705..aed65045f 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -151,7 +151,7 @@ class CommandGreloadmodule : public Command
if (m)
{
GReloadModuleWorker* worker = NULL;
- if (m != creator)
+ if ((m != creator) && (!creator->dying))
worker = new GReloadModuleWorker(user->nick, user->uuid, parameters[0]);
ServerInstance->Modules->Reload(m, worker);
}