From d3238ce9c7913f2aff4603e98975175f3d2a56ad Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Tue, 23 May 2006 02:48:08 -0500 Subject: [PATCH] Check tool item index --- moo/mooutils/moouixml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moo/mooutils/moouixml.c b/moo/mooutils/moouixml.c index 2056cfe7..2d3c13a2 100644 --- a/moo/mooutils/moouixml.c +++ b/moo/mooutils/moouixml.c @@ -2053,6 +2053,9 @@ create_tool_item (MooUIXML *xml, tool_item = gtk_action_create_tool_item (action); } + if (index > gtk_toolbar_get_n_items (toolbar)) + index = -1; + gtk_toolbar_insert (toolbar, GTK_TOOL_ITEM (tool_item), index); g_object_notify (G_OBJECT (action), "tooltip");