summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-03-25 04:42:02 -0500
committerLostDragonist <lost.dragonist@gmail.com>2019-03-25 04:42:02 -0500
commiteb9ac6ca246c13a4f7d6d60a9ec3e9018fe209e8 (patch)
tree37fc9eac0bd82abf03a43f8594d535b95deddd0d /src/organizercore.cpp
parent043a5fa9412f1d766f5f211beabf4bda8afab73a (diff)
Add more protection against missing game plugins
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 687fd6c9..747cfaba 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -885,7 +885,7 @@ MOBase::IModInterface *OrganizerCore::getMod(const QString &name) const
MOBase::IPluginGame *OrganizerCore::getGame(const QString &name) const
{
for (IPluginGame *game : m_PluginContainer->plugins<IPluginGame>()) {
- if (game->gameShortName().compare(name, Qt::CaseInsensitive) == 0)
+ if (game != nullptr && game->gameShortName().compare(name, Qt::CaseInsensitive) == 0)
return game;
}
return nullptr;