summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_h323.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 140c06fa3..a3f6ee6f3 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -1148,7 +1148,7 @@ static struct oh323_pvt *find_call_locked(int call_reference, const char *token)
while(pvt) {
if (!pvt->needdestroy && ((signed int)pvt->cd.call_reference == call_reference)) {
/* Found the call */
- if ((token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
+ if ((token != NULL) && (pvt->cd.call_token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
ast_mutex_lock(&pvt->lock);
ast_mutex_unlock(&iflock);
return pvt;