summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAlan Young <consult.awy@gmail.com>2015-08-20 15:20:17 (GMT)
committerAlan Young <consult.awy@gmail.com>2015-08-20 15:20:17 (GMT)
commitdd662ecbd71e5f7c1f94f886ca22594c51115e05 (patch)
tree43d8e540db36133f88081dfdeb7b0cf4a2b8fe86 /src/com
parent2309da7696163b93b38721833ababd58c7c47217 (diff)
downloadstroke-dd662ecbd71e5f7c1f94f886ca22594c51115e05.zip
stroke-dd662ecbd71e5f7c1f94f886ca22594c51115e05.tar.bz2
Fix NPE in Stanza.getTimestampFrom() when Delay.getFrom() returns null
Change-Id: I2ccf6ae1293859dc8bd49731ee55a90b383d30a8
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/elements/Stanza.java3
1 files changed, 2 insertions, 1 deletions
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<Delay> 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();
}
}