diff src/layout_util.c @ 1345:6fb0c1829b76

Prevent Gtk assertion failures when no icon is set.
author zas_
date Sat, 28 Feb 2009 20:24:42 +0000
parents 63eb48237608
children acf1797b74c7
line wrap: on
line diff
--- a/src/layout_util.c	Sat Feb 28 20:13:11 2009 +0000
+++ b/src/layout_util.c	Sat Feb 28 20:24:42 2009 +0000
@@ -1652,7 +1652,7 @@
 		EditorDescription *editor = work->data;
 		GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, NULL, G_CALLBACK(layout_menu_edit_cb) };
 		
-		if (register_theme_icon_as_stock(editor->key, editor->icon))
+		if (editor->icon && register_theme_icon_as_stock(editor->key, editor->icon))
 			{
 			entry.stock_id = editor->key;
 			}