From patchwork Fri Apr 26 11:24:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 239805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A441F2C0111 for ; Fri, 26 Apr 2013 21:24:55 +1000 (EST) Received: from localhost ([::1]:53128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVglp-0003DT-SX for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2013 07:24:53 -0400 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 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3QBOSYH012782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Apr 2013 07:24:28 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3QBORcb026310; Fri, 26 Apr 2013 07:24:27 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 9010F45B18; Fri, 26 Apr 2013 13:24:26 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/2] gtk: fix cursor unref X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: 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,