From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVglU-0003DA-ON for qemu-devel@nongnu.org; Fri, 26 Apr 2013 07:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVglR-0002f4-N4 for qemu-devel@nongnu.org; Fri, 26 Apr 2013 07:24:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVglR-0002ef-FT for qemu-devel@nongnu.org; Fri, 26 Apr 2013 07:24:29 -0400 From: Gerd Hoffmann Date: Fri, 26 Apr 2013 13:24:25 +0200 Message-Id: <1366975466-21509-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1366975466-21509-1-git-send-email-kraxel@redhat.com> References: <1366975466-21509-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] gtk: fix cursor unref List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Gerd Hoffmann 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 --- 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