From a16b8e63aa85625bfb7d75fb4d70c5e6f9bf66ef Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 10 Mar 2011 22:59:51 +0100 Subject: 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. --- src/urlbar/listitem.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/urlbar/listitem.cpp') 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) { -- cgit v1.2.1