Skip to content

Commit

Permalink
Check if zombie data is null before continuing
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydtorres committed Oct 31, 2016
1 parent adf2b72 commit b6f759a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private void initNavBanner() {

DashHelper dashie = DashHelper.getInstance(this);

if (NightmareHelper.getIsZDayActive(this)) {
if (NightmareHelper.getIsZDayActive(this) && mNation.zombieData != null) {
dashie.loadImage(NightmareHelper.getZombieBanner(mNation.zombieData.action), nationBanner, false);
} else {
dashie.loadImage(Nation.getBannerURL(mNation.bannerKey), nationBanner, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private void processIssues(View v, IssueFullHolder holder) {
issues = new ArrayList<Object>();

// Add zombie card if Z-Day is active
if (NightmareHelper.getIsZDayActive(getContext())) {
if (NightmareHelper.getIsZDayActive(getContext()) && holder.zombieData != null) {
issues.add(holder.zombieData);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void initNationData(View view) {

DashHelper dashie = DashHelper.getInstance(getContext());

if (NightmareHelper.getIsZDayActive(getContext())) {
if (NightmareHelper.getIsZDayActive(getContext()) && mNation.zombieData != null) {
dashie.loadImage(NightmareHelper.getZombieBanner(mNation.zombieData.action), nationBanner, false);
} else {
dashie.loadImage(Nation.getBannerURL(mNation.bannerKey), nationBanner, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private void initRecycler() {
* Either shows the zombie decision dialog or a message saying that no actions are available.
*/
public void showDecisionDialog() {
if (isFinishing()) {
if (isFinishing() || userData.zombieData == null) {
return;
}

Expand Down

0 comments on commit b6f759a

Please sign in to comment.