Fix GNOME bug #599446:

CRITICAL **: atk_object_set_name: assertion `name != NULL' failed

Patch from upstream git.
This commit is contained in:
ajacoutot 2009-11-29 11:54:31 +00:00
parent 5ead73dbfa
commit 8595b7a8f7
2 changed files with 30 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.91 2009/11/22 16:40:04 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.92 2009/11/29 11:54:31 ajacoutot Exp $
SHARED_ONLY= Yes
@ -9,7 +9,7 @@ COMMENT-cups= gtk+2 CUPS print backend
VERSION= 2.18.3
DISTNAME= gtk+-${VERSION}
PKGNAME-main= gtk+2-${VERSION}
PKGNAME-main= gtk+2-${VERSION}p0
PKGNAME-docs= gtk+2-docs-${VERSION}
PKGNAME-cups= gtk+2-cups-${VERSION}p0

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-gtk_gtktoolbutton_c,v 1.1 2009/11/29 11:54:31 ajacoutot Exp $
Functions like gtk_tool_button_new (NULL, NULL) gives critical warnings:
CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
See:
https://bugzilla.gnome.org/show_bug.cgi?id=599446
--- gtk/gtktoolbutton.c.orig Fri Oct 16 16:38:56 2009
+++ gtk/gtktoolbutton.c Sun Nov 29 12:06:38 2009
@@ -916,11 +916,14 @@ gtk_tool_button_set_label (GtkToolButton *button,
button->priv->label_text = g_strdup (label);
button->priv->contents_invalid = TRUE;
- elided_label = _gtk_toolbar_elide_underscores (label);
- accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
- atk_object_set_name (accessible, elided_label);
+ if (label)
+ {
+ elided_label = _gtk_toolbar_elide_underscores (label);
+ accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
+ atk_object_set_name (accessible, elided_label);
+ g_free (elided_label);
+ }
- g_free (elided_label);
g_free (old_label);
g_object_notify (G_OBJECT (button), "label");