summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOgnyan Tonchev <ognyan@axis.com>2014-07-09 15:16:08 +0200
committerWim Taymans <wtaymans@redhat.com>2014-07-09 16:17:00 +0200
commit6543082d2b6eb75da4bddc5b43aa24e759123fae (patch)
tree6343b032295bb0ffaa5bc7ade753998080eef3b0
parentbfd498585a7fba9c9da91b18da8058204ce84afc (diff)
client: check if watch is set in handle_teardown()
The unit tests run without a watch
-rw-r--r--gst/rtsp-server/rtsp-client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index e94567c..43c671a 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -879,7 +879,8 @@ handle_teardown_request (GstRTSPClient * client, GstRTSPContext * ctx)
/* make sure we unblock the backlog and don't accept new messages
* on the watch */
- gst_rtsp_watch_set_flushing (priv->watch, TRUE);
+ if (priv->watch != NULL)
+ gst_rtsp_watch_set_flushing (priv->watch, TRUE);
/* unlink the all TCP callbacks */
unlink_session_transports (client, session, sessmedia);
@@ -887,7 +888,8 @@ handle_teardown_request (GstRTSPClient * client, GstRTSPContext * ctx)
gst_rtsp_session_media_set_state (sessmedia, GST_STATE_NULL);
/* allow messages again so that we can send the reply */
- gst_rtsp_watch_set_flushing (priv->watch, FALSE);
+ if (priv->watch != NULL)
+ gst_rtsp_watch_set_flushing (priv->watch, FALSE);
/* unmanage the media in the session, returns false if all media session
* are torn down. */