Skip to content

Commit 65c36f5

Browse files
author
Alessandro Toppi
committed
Check app_handle pointer before doing a hangup or destroying a plugin session.
1 parent 6b91665 commit 65c36f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ice.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3699,7 +3699,7 @@ static gboolean janus_ice_outgoing_traffic_handle(janus_ice_handle *handle, janu
36993699
janus_plugin *plugin = (janus_plugin *)handle->app;
37003700
JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about the hangup (%s)\n",
37013701
handle->handle_id, plugin ? plugin->get_name() : "??");
3702-
if(plugin != NULL) {
3702+
if(plugin != NULL && handle->app_handle != NULL) {
37033703
plugin->hangup_media(handle->app_handle);
37043704
}
37053705
/* Get rid of the attached sources */
@@ -3725,7 +3725,7 @@ static gboolean janus_ice_outgoing_traffic_handle(janus_ice_handle *handle, janu
37253725
janus_plugin *plugin = (janus_plugin *)handle->app;
37263726
JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about the handle detach (%s)\n",
37273727
handle->handle_id, plugin ? plugin->get_name() : "??");
3728-
if(plugin != NULL) {
3728+
if(plugin != NULL && handle->app_handle != NULL) {
37293729
int error = 0;
37303730
plugin->destroy_session(handle->app_handle, &error);
37313731
}

0 commit comments

Comments
 (0)