summaryrefslogtreecommitdiffstats
path: root/sigtools/PluginLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigtools/PluginLoader.cpp')
-rw-r--r--sigtools/PluginLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sigtools/PluginLoader.cpp b/sigtools/PluginLoader.cpp
index c48076dc..96068d62 100644
--- a/sigtools/PluginLoader.cpp
+++ b/sigtools/PluginLoader.cpp
@@ -123,7 +123,7 @@ KService::Ptr PluginLoader::Private::service(const QString& type, const QString&
{
if (!m_available.contains(type))
refresh(type);
- if (m_available[type].contains(name))
+ if (m_available.contains(type) && m_available[type].contains(name))
return m_available[type][name].first;
return KService::Ptr();
}
@@ -132,7 +132,7 @@ PluginBase* PluginLoader::Private::factory(const QString& type, const QString& n
{
if (!m_available.contains(type))
refresh(type);
- if (m_available[type].contains(name))
+ if (m_available.contains(type) && m_available[type].contains(name))
return m_available[type][name].second;
return NULL;
}