diff options
author | Sadie Powell <sadie@witchery.services> | 2020-11-10 23:34:22 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-11-10 23:34:22 +0000 |
commit | 6214094a84f33ea80af4dac88dd1b82bd59a0b5c (patch) | |
tree | 9bd6381365c4eea0041cb40c640446edf0efbe45 /src | |
parent | 116244f190e8146395d40fb5a43af6b9bb1f6d1f (diff) |
Skip module tags which don't have a module specified.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 17804a48e..77e4142b3 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -479,9 +479,13 @@ void ModuleManager::LoadAll() for (ConfigIter i = tags.first; i != tags.second; ++i) { ConfigTag* tag = i->second; - std::string name = ExpandModName(tag->getString("name")); + + const std::string shortname = tag->getString("name"); + if (shortname.empty()) + continue; // Skip malformed module tags. // Skip modules which are already loaded. + const std::string name = ExpandModName(shortname); if (Modules.find(name) != Modules.end()) continue; |