diff --git a/declarativeimports/core/datasource.cpp b/declarativeimports/core/datasource.cpp index a5bc4aca8..f67a28460 100644 --- a/declarativeimports/core/datasource.cpp +++ b/declarativeimports/core/datasource.cpp @@ -185,7 +185,11 @@ QStringList DataSource::keysForSource(const QString &source) const Plasma::Service *DataSource::serviceForSource(const QString &source) { if (!m_services.contains(source)) { - m_services[source] = m_dataEngine->serviceForSource(source); + Plasma::Service *service = m_dataEngine->serviceForSource(source); + if (!service) { + return 0; + } + m_services[source] = service; } return m_services.value(source);