mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 376581 - ASSERT: null node when deleting last history item. patch from onemen.one@gmail.com, r=me.
This commit is contained in:
parent
be3b7ec321
commit
9c9736c770
@ -947,8 +947,18 @@
|
||||
|
||||
<method name="restoreSelection">
|
||||
<body><![CDATA[
|
||||
var allowedMaxIndex = this.view.rowCount - 1;
|
||||
|
||||
for (var i = 0; i < this._nextSelection.length; ++i) {
|
||||
var range = this._nextSelection[i];
|
||||
|
||||
// make sure the index is not over the end of the view
|
||||
// this fixes bug 376581
|
||||
if (range.max > allowedMaxIndex)
|
||||
range.max = allowedMaxIndex;
|
||||
if (range.min > allowedMaxIndex)
|
||||
range.min = allowedMaxIndex;
|
||||
|
||||
if (range.min > -1 && range.max > -1)
|
||||
this.view.selection.rangedSelect(range.min, range.max, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user