Skip to content

Commit

Permalink
Fix possible NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanklee authored and mar-v-in committed Oct 27, 2022
1 parent a947b02 commit 72df2b4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ private synchronized void startCalculate() {
Thread t = new Thread(requester);
t.start();
} else {
if (cachedCellLocation != null && cachedCellLocation.getAccuracy() <= lastResponse.getAccuracy()) {
if (cachedCellLocation != null && lastResponse != null
&& cachedCellLocation.getAccuracy() <= lastResponse.getAccuracy()) {
resultCallback(cachedCellLocation);
} else {
resultCallback(null);
Expand Down

0 comments on commit 72df2b4

Please sign in to comment.