summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logic/BaseInstance.cpp5
-rw-r--r--logic/Env.cpp5
-rw-r--r--logic/Env.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index 53e4ca6b..f8530c9d 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -35,7 +35,10 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
m_settings->registerSetting("name", "Unnamed Instance");
m_settings->registerSetting("iconKey", "default");
- connect(ENV.icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
+ if (ENV.hasIcons())
+ {
+ connect(ENV.icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
+ }
m_settings->registerSetting("notes", "");
m_settings->registerSetting("lastLaunchTime", 0);
m_settings->registerSetting("totalTimePlayed", 0);
diff --git a/logic/Env.cpp b/logic/Env.cpp
index 4214695d..c9093e77 100644
--- a/logic/Env.cpp
+++ b/logic/Env.cpp
@@ -49,6 +49,11 @@ std::shared_ptr<IconList> Env::icons()
Q_ASSERT(m_icons != nullptr);
return m_icons;
}
+
+bool Env::hasIcons()
+{
+ return m_icons != nullptr;
+}
/*
class NullVersion : public BaseVersion
{
diff --git a/logic/Env.h b/logic/Env.h
index e3c5130a..806fa106 100644
--- a/logic/Env.h
+++ b/logic/Env.h
@@ -34,6 +34,8 @@ public:
std::shared_ptr<IconList> icons();
+ bool hasIcons();
+
/// init the cache. FIXME: possible future hook point
void initHttpMetaCache();