From 20ddba2aa9b173054b1c7922b41892cc42bc31ef Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 1 Nov 2016 10:27:01 +0100 Subject: fixed npe when jingle partner is using unknown candidate --- .../java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 0d6d8c0c..5461b9c6 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -620,6 +620,10 @@ public class JingleConnection implements Transferable { if (cid != null) { Log.d(Config.LOGTAG, "candidate used by counterpart:" + cid); JingleCandidate candidate = getCandidate(cid); + if (candidate == null) { + Log.d(Config.LOGTAG,"could not find candidate with cid="+cid); + return false; + } candidate.flagAsUsedByCounterpart(); this.receivedCandidate = true; if ((mJingleStatus == JINGLE_STATUS_ACCEPTED) -- cgit v1.2.3