diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-05-20 13:05:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-20 13:05:02 +0200 |
| commit | b7110cba2dceb172bf6a903f1c5de5ff1c460f11 (patch) | |
| tree | ee3be3be522842c6ef42c14d48c822fa657333c9 /src/pluginlist.cpp | |
| parent | c214b67ae784537d696a53c8cae00676eefd3841 (diff) | |
| parent | c391c2b584a309f64f87dd5e00b0083279e6211c (diff) | |
Merge pull request #1066 from Holt59/new-filetree
Update for the new file tree implementation and minor fixes
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 1f320982..c2667557 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -185,7 +185,8 @@ void PluginList::refresh(const QString &profileName ChangeBracket<PluginList> layoutChange(this);
QStringList primaryPlugins = m_GamePlugin->primaryPlugins();
- bool lightPluginsAreSupported = m_GamePlugin->feature<GamePlugins>()->lightPluginsAreSupported();
+ GamePlugins *gamePlugins = m_GamePlugin->feature<GamePlugins>();
+ const bool lightPluginsAreSupported = gamePlugins ? gamePlugins->lightPluginsAreSupported() : false;
m_CurrentProfile = profileName;
@@ -265,8 +266,9 @@ void PluginList::refresh(const QString &profileName // indices need to work. priority will be off however
updateIndices();
- GamePlugins *gamePlugins = m_GamePlugin->feature<GamePlugins>();
- gamePlugins->readPluginLists(this);
+ if (gamePlugins) {
+ gamePlugins->readPluginLists(this);
+ }
testMasters();
@@ -521,7 +523,9 @@ void PluginList::saveTo(const QString &lockedOrderFileName , bool hideUnchecked) const
{
GamePlugins *gamePlugins = m_GamePlugin->feature<GamePlugins>();
- gamePlugins->writePluginLists(this);
+ if (gamePlugins) {
+ gamePlugins->writePluginLists(this);
+ }
writeLockedOrder(lockedOrderFileName);
@@ -870,7 +874,10 @@ void PluginList::generatePluginIndexes() {
int numESLs = 0;
int numSkipped = 0;
- bool lightPluginsSupported = m_GamePlugin->feature<GamePlugins>()->lightPluginsAreSupported();
+
+ GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>();
+ const bool lightPluginsSupported = gamePlugins ? gamePlugins->lightPluginsAreSupported() : false;
+
for (int l = 0; l < m_ESPs.size(); ++l) {
int i = m_ESPsByPriority.at(l);
if (!m_ESPs[i].enabled) {
|
