Dbrant has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233949
Change subject: Fix possible crash when closing tabs.
......................................................................
Fix possible crash when closing tabs.
This protects against a possible IndexOutOfBounds exception when closing a
tab. Even though I haven't been able to reproduce it, a few users have
reported it when "closing tabs quickly."
Bug: T109998
Change-Id: Ia9938506fe9c8f97f4ac3803541bdb68639f3fd6
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia
refs/changes/49/233949/1
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index fdbde74..abdeab7 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -446,6 +446,9 @@
@Override
public void onCloseTabRequested(int position) {
+ if (position >= tabList.size()) {
+ return;
+ }
tabList.remove(position);
tabFunnel.logClose(tabList.size(), position);
if (position < tabList.size()) {
--
To view, visit https://gerrit.wikimedia.org/r/233949
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9938506fe9c8f97f4ac3803541bdb68639f3fd6
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits