summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index a3b5b41c7..6be50dd96 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -489,7 +489,11 @@ bool CommandParser::ReloadCommand(const char* cmd, userrec* user)
snprintf(filename, MAXBUF, "cmd_%s.so", commandname);
const char* err = this->LoadCommand(filename);
if (err)
- user->WriteServ("NOTICE %s :*** Error loading 'cmd_%s.so': %s", user->nick, cmd, err);
+ {
+ if (user)
+ user->WriteServ("NOTICE %s :*** Error loading 'cmd_%s.so': %s", user->nick, cmd, err);
+ return false;
+ }
return true;
}