Message ID | 1366975466-21509-2-git-send-email-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
Gerd Hoffmann <kraxel@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 <kraxel@redhat.com> Reviewed-by: Anthony Liguori <aliguori@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
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,
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 <kraxel@redhat.com> --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)