summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-15 14:25:35 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-15 14:25:35 +0000
commit911cc43d9c2a562318a2f9d4e2287f0b48529ee4 (patch)
treedda22d97f3adcfdcf8bb28ed8ae3f2cfa834c269 /src
parent6ba8f8b26401ec8a5cf2fcb61deacc275a52e0df (diff)
Check if a command routine exists before all command calls
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2894 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands.c b/src/commands.c
index 0560798f5..f846ee8db 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -105,7 +105,8 @@ void do_run_cmd(char *service, User * u, Command * c, const char *cmd)
while (current && retVal == MOD_CONT) {
mod_current_module_name = current->mod_name;
mod_current_module = NULL;
- retVal = current->routine(u);
+ if (current->routine)
+ retVal = current->routine(u);
mod_current_module_name = NULL;
current = current->next;
}