aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index d240355ef2f..6902f1e4025 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1412,11 +1412,12 @@ If FRAME is nil or not given, use the selected frame. */)
1412 /* Activate the first menu. */ 1412 /* Activate the first menu. */
1413 GList *children = gtk_container_get_children (GTK_CONTAINER (menubar)); 1413 GList *children = gtk_container_get_children (GTK_CONTAINER (menubar));
1414 1414
1415 gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar), 1415 if (children)
1416 GTK_WIDGET (children->data)); 1416 {
1417 1417 g_signal_emit_by_name (children->data, "activate_item");
1418 popup_activated_flag = 1; 1418 popup_activated_flag = 1;
1419 g_list_free (children); 1419 g_list_free (children);
1420 }
1420 } 1421 }
1421 UNBLOCK_INPUT; 1422 UNBLOCK_INPUT;
1422 1423