[Spice-devel] [PATCH spice-gtk 2/7] channel: check if channel has a session

Pavel Grunt pgrunt at redhat.com
Mon May 23 08:06:46 UTC 2016


Acked-by: Pavel Grunt <pgrunt at redhat.com>

On Fri, 2016-05-20 at 17:16 +0200, Marc-André Lureau wrote:
> Since 8943d2329, the channel may be disconnected from the session
> before it's destroyed. In this case, session is NULL.
> 
> Fixes some critical with virt-manager when closing a display:
> 
> (virt-manager:20451): GSpice-CRITICAL **: spice_session_is_for_migration:
> assertion 'SPICE_IS_SESSION(session)' failed
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> ---
>  src/spice-channel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/spice-channel.c b/src/spice-channel.c
> index 35a2cae..c555f75 100644
> --- a/src/spice-channel.c
> +++ b/src/spice-channel.c
> @@ -2307,7 +2307,7 @@ static gboolean spice_channel_delayed_unref(gpointer
> data)
>      c->state = SPICE_CHANNEL_STATE_UNCONNECTED;
>  
>      session = spice_channel_get_session(channel);
> -    if (spice_session_is_for_migration(session)) {
> +    if (session && spice_session_is_for_migration(session)) {
>          /* error during migration - abort migration */
>          spice_session_abort_migration(session);
>          return FALSE;


More information about the Spice-devel mailing list