Skip to content

Commit

Permalink
Fix potential NPE in NodeImpl (Graylog2#4632)
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi authored and dennisoelkers committed Mar 2, 2018
1 parent 77d03b0 commit 87a90ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public String getTransportAddress() {

@Override
public DateTime getLastSeen() {
return new DateTime(((Integer) fields.get("last_seen")) * 1000L, DateTimeZone.UTC);
return new DateTime(((Integer) fields.getOrDefault("last_seen", 0)) * 1000L, DateTimeZone.UTC);
}

@Override
Expand Down

0 comments on commit 87a90ec

Please sign in to comment.