mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
436a51a9c7
commit
b833653cb5
@ -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