fix crash in articlepager when m_article is null
This commit is contained in:
parent
f89bdad904
commit
6d016599b8
@ -175,12 +175,14 @@ public class ArticlePager extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_article != null) {
|
||||||
if (m_article.id == 0 || m_articles.indexOf(m_article) == -1) {
|
if (m_article.id == 0 || m_articles.indexOf(m_article) == -1) {
|
||||||
if (m_articles.size() > 0) {
|
if (m_articles.size() > 0) {
|
||||||
m_article = m_articles.get(0);
|
m_article = m_articles.get(0);
|
||||||
m_listener.onArticleSelected(m_article, false);
|
m_listener.onArticleSelected(m_article, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (m_lastError == ApiError.LOGIN_FAILED) {
|
if (m_lastError == ApiError.LOGIN_FAILED) {
|
||||||
|
Loading…
Reference in New Issue
Block a user