From 05485be9f0ff3194ace46efaf156dd30441f29df Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 5 Feb 2019 00:00:56 +0000 Subject: Module: Initialise 'ModuleDLLManager' and 'dying' correctly. --- src/modulemanager.cpp | 1 - src/modules.cpp | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index eb40c5971..86edd572f 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -66,7 +66,6 @@ bool ModuleManager::Load(const std::string& modname, bool defer) { newmod->ModuleSourceFile = filename; newmod->ModuleDLLManager = newhandle; - newmod->dying = false; Modules[filename] = newmod; std::string version = newhandle->GetVersion(); if (version.empty()) diff --git a/src/modules.cpp b/src/modules.cpp index c2233a893..1c2fe3354 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -54,11 +54,17 @@ Version::Version(const std::string &desc, int flags, const std::string& linkdata // These declarations define the behavours of the base class Module (which does nothing at all) -Module::Module() { } +Module::Module() + : ModuleDLLManager(NULL) + , dying(false) +{ +} + CullResult Module::cull() { return classbase::cull(); } + Module::~Module() { } -- cgit v1.2.3