diff options
| author | Tannin <sherb@gmx.net> | 2016-05-11 20:12:14 +0200 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2016-05-11 20:12:14 +0200 |
| commit | 59a36107a1ba47b69c5016bf833922fbe5509e7c (patch) | |
| tree | 246ce82f1865d6556ee20dc1b4fd7d8a445eef56 /src/pluginlist.cpp | |
| parent | bc5d5d8bfa3f404389069e37bb03376f5930c256 (diff) | |
fixed crash when disabling mods
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 0622f729..1978c749 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -163,10 +163,16 @@ void PluginList::refresh(const QString &profileName for (const auto &espName : m_ESPsByName) {
if (!availablePlugins.contains(espName.first)) {
- m_ESPs.erase(m_ESPs.begin() + espName.second);
+ m_ESPs[espName.second].m_Name = "";
}
}
+ m_ESPs.erase(std::remove_if(m_ESPs.begin(), m_ESPs.end(),
+ [](const ESPInfo &info) -> bool {
+ return info.m_Name.isEmpty();
+ }),
+ m_ESPs.end());
+
fixPriorities();
// functions in GamePlugins will use the IPluginList interface of this, so
|
