MenuShell: Typecheck the instance @ select_first()

since this is public API and therefore might get junk passed to it.
This commit is contained in:
Daniel Boles
2018-04-17 19:49:24 +01:00
parent 60b4a3869a
commit bcc539ca07

View File

@ -1462,10 +1462,14 @@ void
gtk_menu_shell_select_first (GtkMenuShell *menu_shell, gtk_menu_shell_select_first (GtkMenuShell *menu_shell,
gboolean search_sensitive) gboolean search_sensitive)
{ {
GtkMenuShellPrivate *priv = menu_shell->priv; GtkMenuShellPrivate *priv;
GtkWidget *to_select = NULL; GtkWidget *to_select = NULL;
GList *tmp_list; GList *tmp_list;
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
priv = menu_shell->priv;
tmp_list = priv->children; tmp_list = priv->children;
while (tmp_list) while (tmp_list)
{ {