fixed npe when jingle partner is using unknown candidate

This commit is contained in:
Daniel Gultsch 2016-11-01 10:27:01 +01:00
parent 07a71d312a
commit 20ddba2aa9
1 changed files with 4 additions and 0 deletions

View File

@ -620,6 +620,10 @@ public class JingleConnection implements Transferable {
if (cid != null) { if (cid != null) {
Log.d(Config.LOGTAG, "candidate used by counterpart:" + cid); Log.d(Config.LOGTAG, "candidate used by counterpart:" + cid);
JingleCandidate candidate = getCandidate(cid); JingleCandidate candidate = getCandidate(cid);
if (candidate == null) {
Log.d(Config.LOGTAG,"could not find candidate with cid="+cid);
return false;
}
candidate.flagAsUsedByCounterpart(); candidate.flagAsUsedByCounterpart();
this.receivedCandidate = true; this.receivedCandidate = true;
if ((mJingleStatus == JINGLE_STATUS_ACCEPTED) if ((mJingleStatus == JINGLE_STATUS_ACCEPTED)