summaryrefslogtreecommitdiff
path: root/pjmedia/src
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/src')
-rw-r--r--pjmedia/src/pjmedia/sdp_neg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c
index 46f23a03..596362fe 100644
--- a/pjmedia/src/pjmedia/sdp_neg.c
+++ b/pjmedia/src/pjmedia/sdp_neg.c
@@ -1400,7 +1400,9 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_cancel_offer(pjmedia_sdp_neg *neg)
neg->neg_local_sdp = neg->neg_remote_sdp = NULL;
neg->has_remote_answer = PJ_FALSE;
- if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) {
+ if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER &&
+ neg->active_local_sdp)
+ {
/* Increment next version number. This happens if for example
* the reinvite offer is rejected by 488. If we don't increment
* the version here, the next offer will have the same version.