client: only free connection when there is one
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 27 Nov 2012 10:17:45 +0000 (11:17 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 27 Nov 2012 10:17:45 +0000 (11:17 +0100)
It's possible that the client doesn't have a connection when we try to free it.

gst/rtsp-server/rtsp-client.c

index f382282..94c5d4c 100644 (file)
@@ -224,7 +224,8 @@ gst_rtsp_client_finalize (GObject * obj)
 
   client_cleanup_sessions (client);
 
-  gst_rtsp_connection_free (client->connection);
+  if (client->connection)
+    gst_rtsp_connection_free (client->connection);
   if (client->session_pool)
     g_object_unref (client->session_pool);
   if (client->mount_points)