Skip to content

Commit

Permalink
Fix NPE in PingService
Browse files Browse the repository at this point in the history
  • Loading branch information
kenumir committed Dec 30, 2016
1 parent 020d263 commit 4afb5a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/wt/pinger/service/PingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void onError(String er) {
public void onFinish() {
mPingProgram = null;
PingItem data = new PingItem();
data.addressId = mPingItem._id;
data.addressId = mPingItem != null ? mPingItem._id : null;
data.info = getResources().getString(R.string.ping_info_finish);
data.timestamp = System.currentTimeMillis();
getContentResolver().insert(PingContentProvider.URI_CONTENT, data.toContentValues(true));
Expand Down

0 comments on commit 4afb5a7

Please sign in to comment.