From c1316150a7b0679494828b8acab8c8fa2c35fa7b Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 23 Dec 2006 15:14:54 +0000 Subject: Fix issue where the last module to be loaded wasnt unloaded by restart git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6074 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 773f87f66..8c38914e9 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -328,6 +328,10 @@ std::pair InspIRCd::GetInterfaceInstanceCount(Module* m) const std::string& InspIRCd::GetModuleName(Module* m) { static std::string nothing = ""; /* Prevent compiler warning */ + + if (!this->GetModuleCount()) + return nothing; + for (int i = 0; i <= this->GetModuleCount(); i++) { if (this->modules[i] == m) -- cgit v1.3.1-10-gc9f91