summaryrefslogtreecommitdiff
path: root/src/modules/m_helpop.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 22:07:52 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 22:07:52 +0000
commit549b2c1e62c6da4ceee128c09f39efea2aaf70d2 (patch)
treebe3b864dfdb4baea076b97d5f716d5a454496761 /src/modules/m_helpop.cpp
parenta53b41417bc825bfce8f932c079a8f90336299c5 (diff)
Fixed segfault when file isnt found
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2178 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_helpop.cpp')
-rw-r--r--src/modules/m_helpop.cpp7
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();
}