diff options
author | Andrew Dolgov <[email protected]> | 2017-06-06 21:58:31 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-06 21:58:31 +0300 |
commit | d5871ce245413045d1ab8d005fbe776a25f6eba4 (patch) | |
tree | e69bb0a0b998769719fb699a30e941acf06dea17 /org.fox.ttrss/src/main | |
parent | 5d746b07f0d7851da66300f2a8236b2e3715b5b9 (diff) |
articlepager.getitem: handle index out of bounds (not sure how would pager respond but w/e)
Diffstat (limited to 'org.fox.ttrss/src/main')
-rwxr-xr-x | org.fox.ttrss/src/main/AndroidManifest.xml | 4 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 2ae4d7ff..abe178bd 100755 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -2,8 +2,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="org.fox.ttrss" - android:versionCode="444" - android:versionName="1.210"> + android:versionCode="445" + android:versionName="1.211"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java index d80a6c18..5db142b4 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java @@ -52,14 +52,19 @@ public class ArticlePager extends Fragment { @Override public Fragment getItem(int position) { - Article article = m_articles.get(position); - - if (article != null) { - ArticleFragment af = new ArticleFragment(); - af.initialize(article); + try { + Article article = m_articles.get(position); + + if (article != null) { + ArticleFragment af = new ArticleFragment(); + af.initialize(article); - return af; + return af; + } + } catch (IndexOutOfBoundsException e) { + e.printStackTrace(); } + return null; } |