Skip to content

Commit

Permalink
Merge pull request #1943 from dimagi/updateRotationFix
Browse files Browse the repository at this point in the history
Fixes NPE on rotation for Update Prompts
  • Loading branch information
Aliza Stone authored Feb 12, 2018
2 parents a7bda26 + 97042ee commit 56ea51f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/org/commcare/activities/PromptUpdateActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public abstract class PromptUpdateActivity extends SessionAwareCommCareActivity
@Override
public void onCreateSessionSafe(Bundle savedInstanceState) {
super.onCreateSessionSafe(savedInstanceState);
refreshUpdateToPromptObject();
if (updateToPrompt == null) {
refreshUpdateToPromptObject();
}
setupUI();
}

Expand Down Expand Up @@ -97,6 +99,9 @@ protected String getCurrentClientName() {
}

protected boolean inForceMode() {
if (updateToPrompt == null) {
refreshUpdateToPromptObject();
}
return updateToPrompt.isForced();
}

Expand Down

0 comments on commit 56ea51f

Please sign in to comment.