Skip to content

Commit

Permalink
http_transport: add NULL checks (#2012)
Browse files Browse the repository at this point in the history
Refs #2005
  • Loading branch information
tmatth authored Mar 23, 2020
1 parent 576afcd commit c6bebed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transports/janus_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,9 @@ int janus_http_send_message(janus_transport_session *transport, void *request_id
janus_http_msg *msg = NULL;
while(session->longpolls) {
transport = (janus_transport_session *)session->longpolls->data;
msg = (janus_http_msg *)transport->transport_p;
msg = (janus_http_msg *)(transport ? transport->transport_p : NULL);
/* Is this connection ready to send a response back? */
if(g_atomic_pointer_compare_and_exchange(&msg->longpoll, session, NULL)) {
if(msg && g_atomic_pointer_compare_and_exchange(&msg->longpoll, session, NULL)) {
/* Send the events back */
if(msg->timeout != NULL) {
g_source_destroy(msg->timeout);
Expand Down

0 comments on commit c6bebed

Please sign in to comment.