[gtk] MenuShell: Typecheck the instance @ select_first()
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] MenuShell: Typecheck the instance @ select_first()
- Date: Tue, 17 Apr 2018 20:13:08 +0000 (UTC)
commit f6ba206d07d82503e8401e7a68783508777348e8
Author: Daniel Boles <dboles src gmail com>
Date: Tue Apr 17 19:49:24 2018 +0100
MenuShell: Typecheck the instance @ select_first()
since this is public API and therefore might get junk passed to it.
gtk/gtkmenushell.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 1126d94620..a69bc0ada8 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1231,9 +1231,13 @@ void
gtk_menu_shell_select_first (GtkMenuShell *menu_shell,
gboolean search_sensitive)
{
- GtkMenuShellPrivate *priv = menu_shell->priv;
+ GtkMenuShellPrivate *priv;
GList *tmp_list;
+ g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
+
+ priv = menu_shell->priv;
+
tmp_list = priv->children;
while (tmp_list)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]