Skip to content

Commit

Permalink
Fix NPE in ApplicationStatus.
Browse files Browse the repository at this point in the history
The return line being outside the synchronized block allowed the cached
state to be reset to null before it was calculated.

BUG=470966

Review URL: https://codereview.chromium.org/1031413005

Cr-Commit-Position: refs/heads/master@{#322479}
  • Loading branch information
maxbogue authored and Commit bot committed Mar 26, 2015
1 parent 5005913 commit 3b8ad9a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ public static int getStateForApplication() {
if (sCachedApplicationState == null) {
sCachedApplicationState = determineApplicationState();
}
return sCachedApplicationState.intValue();
}

return sCachedApplicationState.intValue();
}

/**
Expand Down

0 comments on commit 3b8ad9a

Please sign in to comment.