fixed NPE on navDrawerData
This commit is contained in:
parent
8ed3f95ec5
commit
9e7bb5ce73
|
@ -365,12 +365,14 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
|||
return -1;
|
||||
} else { // last fragment was not a list, but a feed
|
||||
long feedId = Long.parseLong(lastFragment);
|
||||
if (navDrawerData != null) {
|
||||
List<Feed> feeds = navDrawerData.feeds;
|
||||
for (int i = 0; i < feeds.size(); i++) {
|
||||
if (feeds.get(i).getId() == feedId) {
|
||||
return i + navAdapter.getSubscriptionOffset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue