mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix crash caused by the backout-patch for bug 240397.
This commit is contained in:
parent
7837e21982
commit
5801eded85
@ -495,7 +495,9 @@ nsNavHistory::AutoCompleteFullHistorySearch(const nsAString& aSearchString,
|
||||
matches.Sort(comparator);
|
||||
|
||||
// fill into result
|
||||
for (i = 0; i < matches.Length(); i ++) {
|
||||
rv = aResult->AppendMatch(matches[0].url, matches[0].title);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
for (i = 1; i < matches.Length(); i ++) {
|
||||
// only add ones that are NOT the same as the previous one. It's possible
|
||||
// to get duplicates from the queries.
|
||||
if (!matches[i].url.Equals(matches[i-1].url)) {
|
||||
|
Loading…
Reference in New Issue
Block a user