summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 6d53c4f5..a2e59b62 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -1009,16 +1009,7 @@ MOBase::IModInterface* ModList::getMod(const QString& name) const
bool ModList::removeMod(MOBase::IModInterface* mod)
{
- unsigned int index = ModInfo::getIndex(mod->name());
- bool result = false;
- if (index == UINT_MAX) {
- if (auto* p = dynamic_cast<ModInfo*>(mod)) {
- result = p->remove();
- }
- }
- else {
- result = ModInfo::removeMod(index);
- }
+ bool result = ModInfo::removeMod(ModInfo::getIndex(mod->name()));
if (result) {
notifyModRemoved(mod->name());
}