diff --git a/src/backends/meta-screen-cast-session.c b/src/backends/meta-screen-cast-session.c index a0258bd39..c6d8ad59c 100644 --- a/src/backends/meta-screen-cast-session.c +++ b/src/backends/meta-screen-cast-session.c @@ -350,7 +350,17 @@ static void on_stream_closed (MetaScreenCastStream *stream, MetaScreenCastSession *session) { - meta_dbus_session_close (META_DBUS_SESSION (session)); + session->streams = g_list_remove (session->streams, stream); + g_object_unref (stream); + + switch (session->session_type) + { + case META_SCREEN_CAST_SESSION_TYPE_NORMAL: + meta_dbus_session_close (META_DBUS_SESSION (session)); + break; + case META_SCREEN_CAST_SESSION_TYPE_REMOTE_DESKTOP: + break; + } } static gboolean