summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
authortrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-10-10 05:51:21 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-10-10 05:51:21 +0000
commit20d3109377483a6a06ff9d62774b39989bb1a8f4 (patch)
tree6b41d0d9becb952b4bca46a6f9284c5033778cf2 /src/modules.c
parente087af8c27ab8da9299531c3019be43f060df34e (diff)
BUILD : 1.7.5 (383) BUGS : N/A NOTES : glist fix - DrStein, improved on DrStein typo fix to init.c - TSL, tons of NULL crash checks - TSL
git-svn-id: svn://svn.anope.org/anope/trunk@383 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@252 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules.c b/src/modules.c
index fede2de3c..0adcff9fe 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -546,6 +546,10 @@ Command *createCommand(const char *name, int (*func) (User * u),
int help_reg, int help_oper, int help_admin,
int help_root)
{
+ if (!name || !*name) {
+ return NULL;
+ }
+
Command *c;
if ((c = malloc(sizeof(Command))) == NULL) {
fatal("Out of memory!");