From a2860d06e429f35a4bacf4ea8a01eeeed1472285 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 24 Jun 2014 12:18:46 +0200 Subject: Remove now needless dynref_init_complete ModuleManager is constructed when ServerInstance is non-NULL, test that instead --- src/modules.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules.cpp b/src/modules.cpp index 9ca33e2dd..edcb243e2 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -33,11 +33,9 @@ #endif static intrusive_list* dynrefs = NULL; -static bool dynref_init_complete = false; void dynamic_reference_base::reset_all() { - dynref_init_complete = true; if (!dynrefs) return; for (intrusive_list::iterator i = dynrefs->begin(); i != dynrefs->end(); ++i) @@ -674,7 +672,9 @@ dynamic_reference_base::dynamic_reference_base(Module* Creator, const std::strin if (!dynrefs) dynrefs = new intrusive_list; dynrefs->push_front(this); - if (dynref_init_complete) + + // Resolve unless there is no ModuleManager (part of class InspIRCd) + if (ServerInstance) resolve(); } -- cgit v1.2.3