summaryrefslogtreecommitdiffstats
path: root/kfind/kquery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kfind/kquery.cpp')
-rw-r--r--kfind/kquery.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/kfind/kquery.cpp b/kfind/kquery.cpp
index 5d5446fc6..92b867567 100644
--- a/kfind/kquery.cpp
+++ b/kfind/kquery.cpp
@@ -372,11 +372,16 @@ void KQuery::processQuery( KFileItem* file)
}
else
{
- if (str.find(m_context, 0, m_casesensitive) != -1)
- {
- matchingLine=QString::number(matchingLineNumber)+": "+str;
- found = true;
- break;
+ if ((!str.isNull()) && (!m_context.isNull())) {
+ if (str.find(m_context, 0, m_casesensitive) != -1)
+ {
+ matchingLine=QString::number(matchingLineNumber)+": "+str;
+ found = true;
+ break;
+ }
+ }
+ else {
+ return;
}
}
kapp->processEvents();