From 6d016599b8851053b90e9a9f6478108ebb4539ee Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 27 Aug 2013 13:04:22 +0400 Subject: [PATCH] fix crash in articlepager when m_article is null --- src/org/fox/ttrss/ArticlePager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/org/fox/ttrss/ArticlePager.java b/src/org/fox/ttrss/ArticlePager.java index 9caa72d1..9b968cea 100644 --- a/src/org/fox/ttrss/ArticlePager.java +++ b/src/org/fox/ttrss/ArticlePager.java @@ -175,10 +175,12 @@ public class ArticlePager extends Fragment { } } - if (m_article.id == 0 || m_articles.indexOf(m_article) == -1) { - if (m_articles.size() > 0) { - m_article = m_articles.get(0); - m_listener.onArticleSelected(m_article, false); + if (m_article != null) { + if (m_article.id == 0 || m_articles.indexOf(m_article) == -1) { + if (m_articles.size() > 0) { + m_article = m_articles.get(0); + m_listener.onArticleSelected(m_article, false); + } } }