diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 15:26:31 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 15:26:31 -0400 |
commit | e2d97b99d1422491251d666838e157f883d2b47b (patch) | |
tree | 7fdc694fff764c2e05a86b8f3f572ca3c9ff1bc1 /sigtools | |
parent | 7d8d711df4630e10d96e349952e8b54fced3de18 (diff) | |
download | sigen-e2d97b99d1422491251d666838e157f883d2b47b.tar.gz sigen-e2d97b99d1422491251d666838e157f883d2b47b.tar.xz sigen-e2d97b99d1422491251d666838e157f883d2b47b.zip |
Make sure there are types before looking for the service or plugin
Diffstat (limited to 'sigtools')
-rw-r--r-- | sigtools/PluginLoader.cpp | 4 |
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; } |