Commit 11d121cc authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Make sure we never search on an invalid KNS backend

CCBUG: 386045
parent cefd4b65
......@@ -309,9 +309,7 @@ static ResultsStream* voidStream()
ResultsStream* KNSBackend::search(const AbstractResourcesBackend::Filters& filter)
{
Q_ASSERT(isValid());
if ((!filter.resourceUrl.isEmpty() && filter.resourceUrl.scheme() != QLatin1String("kns")) || !filter.mimetype.isEmpty())
if (!m_isValid || (!filter.resourceUrl.isEmpty() && filter.resourceUrl.scheme() != QLatin1String("kns")) || !filter.mimetype.isEmpty())
return voidStream();
if (filter.resourceUrl.scheme() == QLatin1String("kns")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment