[Spice-devel] [PATCH spice-gtk] widget: disconnect session_inhibit_keyboard_grab_changed

Uri Lublin uril at redhat.com
Tue May 29 05:31:12 PDT 2012


On 05/29/2012 03:05 PM, Marc-André Lureau wrote:
> There is one handler we forgot to disconnect on dispose()
> that may cause a crash.

Yes, just like  channel_new() and channel_destroy(), that are
connected in spice_display_constructor(), and are
disconnected in spice_display_dispose().

Ack.


>
> I am thinking of generalizing usage of
> spice_g_signal_connect_object()..
>
> Should fix:
> https://bugzilla.redhat.com/show_bug.cgi?id=823570
> ---
>   gtk/spice-widget.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index 0abd4c6..2ae76d8 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -298,6 +298,8 @@ static void spice_display_dispose(GObject *obj)
>                                                display);
>           g_signal_handlers_disconnect_by_func(d->session, G_CALLBACK(channel_destroy),
>                                                display);
> +        g_signal_handlers_disconnect_by_func(d->session, G_CALLBACK(session_inhibit_keyboard_grab_changed),
> +                                             display);
>           g_object_unref(d->session);
>           d->session = NULL;
>           d->gtk_session = NULL;



More information about the Spice-devel mailing list