From 8baeaed457aaee5539b341d94ef74a432fae9277 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Mon, 7 Nov 2016 21:38:22 +0100 Subject: fixed npe when jingle partner is using unknown candidate --- src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java index 6db0b9787..5417b8deb 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java @@ -624,6 +624,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