diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-04 22:07:52 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-04 22:07:52 +0000 |
commit | 549b2c1e62c6da4ceee128c09f39efea2aaf70d2 (patch) | |
tree | be3b864dfdb4baea076b97d5f716d5a454496761 | |
parent | a53b41417bc825bfce8f932c079a8f90336299c5 (diff) |
Fixed segfault when file isnt found
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2178 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_helpop.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index ffd63cb06..6681d8f66 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -38,6 +38,9 @@ void handle_helpop(char **parameters, int pcnt, userrec *user) char a[MAXBUF]; std::string output = " "; + if (!helpop) + return; + if (pcnt < 1) { do_helpop(NULL,pcnt,user); @@ -176,6 +179,7 @@ class ModuleHelpop : public Module if (h_file == "") { + helpop = NULL; log(DEFAULT,"m_helpop: Helpop file not Specified."); return; } @@ -194,7 +198,8 @@ class ModuleHelpop : public Module virtual void OnRehash(std::string parameter) { delete conf; - delete helpop; + if (helpop) + delete helpop; ReadConfig(); } |