Gerd Hoffmann <kra...@redhat.com> writes:

> Use correct unref function, cursors are not gobjects (at least in gtk2).
> Fixes crash, reproducer: "qemu -vga qxl -display gtk".
>
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>

Reviewed-by: Anthony Liguori <aligu...@us.ibm.com>

Regards,

Anthony Liguori

> ---
>  ui/gtk.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 42e3c0a..71fda24 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -359,7 +359,7 @@ static void gd_cursor_define(DisplayChangeListener *dcl,
>                                          pixbuf, c->hot_x, c->hot_y);
>      gdk_window_set_cursor(gtk_widget_get_window(s->drawing_area), cursor);
>      g_object_unref(pixbuf);
> -    g_object_unref(cursor);
> +    gdk_cursor_unref(cursor);
>  }
>  
>  static void gd_switch(DisplayChangeListener *dcl,
> -- 
> 1.7.9.7


Reply via email to