From 645419f2f5bfab61eacfcbb938f12e807ec11d25 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 10 Mar 2010 21:41:37 +0000 Subject: [PATCH] protect against stupid DataEngineScript implementations BUG:230225 svn path=/trunk/KDE/kdelibs/; revision=1101773 --- dataengine.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dataengine.cpp b/dataengine.cpp index 2cfe59d7b..6784734a8 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -75,10 +75,13 @@ QStringList DataEngine::sources() const Service *DataEngine::serviceForSource(const QString &source) { if (d->script) { - return d->script->serviceForSource(source); - } else { - return new NullService(source, this); + Service * s = d->script->serviceForSource(source); + if (s) { + return s; + } } + + return new NullService(source, this); } void DataEngine::connectSource(const QString &source, QObject *visualization,