From 03fa8ed25930a43d4c9d9d17e8bcd418780cae1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 21 Jul 2019 10:22:05 +0200 Subject: [PATCH] cellrenderertext: Don't unnecessarily ref a layout We never pass a NULL layout to get_size(). --- gtk/gtkcellrenderertext.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index a3b09a89b1..965818d7ec 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1652,11 +1652,6 @@ get_size (GtkCellRenderer *cell, if (width == NULL) return; } - - if (layout) - g_object_ref (layout); - else - layout = get_layout (celltext, widget, NULL, 0); pango_layout_get_pixel_extents (layout, NULL, &rect); @@ -1696,8 +1691,6 @@ get_size (GtkCellRenderer *cell, if (width) *width = xpad * 2 + rect.width; - - g_object_unref (layout); } static void