[gtk/gtk-3-22: 1/2] stack: protect set_visible_child_name from NULL stack



commit 2ee5aee4a9f01cce3dda7dff877070b62c3e2880
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Apr 18 20:58:57 2018 -0500

    stack: protect set_visible_child_name from NULL stack
    
    Return with error if gtk_stack_set_visible_child_name is called
    with NULL parameter

 gtk/gtkstack.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 6ef9206818..6815488a3e 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1836,6 +1836,8 @@ gtk_stack_set_visible_child_name (GtkStack   *stack,
 {
   GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
 
+  g_return_if_fail (GTK_IS_STACK (stack));
+
   gtk_stack_set_visible_child_full (stack, name, priv->transition_type);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]