From dd662ecbd71e5f7c1f94f886ca22594c51115e05 Mon Sep 17 00:00:00 2001 From: Alan Young Date: Thu, 20 Aug 2015 17:20:17 +0200 Subject: Fix NPE in Stanza.getTimestampFrom() when Delay.getFrom() returns null Change-Id: I2ccf6ae1293859dc8bd49731ee55a90b383d30a8 diff --git a/src/com/isode/stroke/elements/Stanza.java b/src/com/isode/stroke/elements/Stanza.java index 82fd41b..11ba1b4 100644 --- a/src/com/isode/stroke/elements/Stanza.java +++ b/src/com/isode/stroke/elements/Stanza.java @@ -177,7 +177,8 @@ public abstract class Stanza implements Element { Vector delays = getPayloads(new Delay()); for (int i = 0; i < delays.size(); ++i) { Delay delay = delays.get(i); - if (delay.getFrom().equals(jid)) { + final JID from = delay.getFrom(); + if (from != null && from.equals(jid)) { return delay.getStamp(); } } -- cgit v0.10.2-6-g49f6