prevent crash when loading empty feed

This commit is contained in:
Andrew Dolgov 2013-02-10 11:19:52 +04:00
parent 535b04dbe1
commit 1c2d0549cb

View File

@ -221,7 +221,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
if (hf != null) {
Article article = hf.getActiveArticle();
if (article == null) {
if (article == null && hf.getAllArticles().size() > 0) {
article = hf.getAllArticles().get(0);
hf.setActiveArticle(article);