mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
fix #136202 (gtk_toolbar_insert_stock crashes if stock lookup fails)
This commit is contained in:
parent
c0dfbacbc9
commit
64cac40d2c
@ -1,3 +1,9 @@
|
||||
2004-03-06 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Check return value
|
||||
of gtk_stock_lookup; if stock lookup fails, just use stock_id as
|
||||
label, instead of crashing. Fixes #136202.
|
||||
|
||||
2004-03-05 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/linux-fb/gdkglobals-fb.c: Make <config.h> the very first
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-03-06 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Check return value
|
||||
of gtk_stock_lookup; if stock lookup fails, just use stock_id as
|
||||
label, instead of crashing. Fixes #136202.
|
||||
|
||||
2004-03-05 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/linux-fb/gdkglobals-fb.c: Make <config.h> the very first
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-03-06 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Check return value
|
||||
of gtk_stock_lookup; if stock lookup fails, just use stock_id as
|
||||
label, instead of crashing. Fixes #136202.
|
||||
|
||||
2004-03-05 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/linux-fb/gdkglobals-fb.c: Make <config.h> the very first
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-03-06 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Check return value
|
||||
of gtk_stock_lookup; if stock lookup fails, just use stock_id as
|
||||
label, instead of crashing. Fixes #136202.
|
||||
|
||||
2004-03-05 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/linux-fb/gdkglobals-fb.c: Make <config.h> the very first
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-03-06 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
|
||||
|
||||
* gtk/gtktoolbar.c (internal_insert_element): Check return value
|
||||
of gtk_stock_lookup; if stock lookup fails, just use stock_id as
|
||||
label, instead of crashing. Fixes #136202.
|
||||
|
||||
2004-03-05 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/linux-fb/gdkglobals-fb.c: Make <config.h> the very first
|
||||
|
@ -3636,12 +3636,13 @@ internal_insert_element (GtkToolbar *toolbar,
|
||||
if (text && use_stock)
|
||||
{
|
||||
GtkStockItem stock_item;
|
||||
gtk_stock_lookup (text, &stock_item);
|
||||
if (gtk_stock_lookup (text, &stock_item))
|
||||
{
|
||||
if (!icon)
|
||||
icon = gtk_image_new_from_stock (text, toolbar->icon_size);
|
||||
|
||||
if (!icon)
|
||||
icon = gtk_image_new_from_stock (text, toolbar->icon_size);
|
||||
|
||||
text = free_me = _gtk_toolbar_elide_underscores (stock_item.label);
|
||||
text = free_me = _gtk_toolbar_elide_underscores (stock_item.label);
|
||||
}
|
||||
}
|
||||
|
||||
if (text)
|
||||
|
Loading…
Reference in New Issue
Block a user