summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-03-10 22:59:51 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-03-10 22:59:51 +0100
commita16b8e63aa85625bfb7d75fb4d70c5e6f9bf66ef (patch)
treea8702d927ca7d8ee6baa20aa50f157044f894fd3 /src
parentAnother one in the "fixing the dangerous commit" series. (diff)
downloadrekonq-a16b8e63aa85625bfb7d75fb4d70c5e6f9bf66ef.tar.xz
Fix crash on "s" type :D
This crash was reported with this bt (reduced here): Hence, the fix. Just checking if the QBitArray is empty.
Diffstat (limited to 'src')
-rw-r--r--src/urlbar/listitem.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index e1c13ce7..c6f4210e 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -226,6 +226,11 @@ static QString highlightWordsInText(const QString &text, const QStringList &word
index = ret.indexOf(wordToPointOut, index + wordToPointOut.size(), Qt::CaseInsensitive);
}
}
+
+
+ if (boldSections.isEmpty())
+ return ret;
+
int numSections = 0;
for (int i = 0; i < boldSections.size() - 1; ++i)
{