[gtk] stack: protect set_visible_child_name from NULL stack
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] stack: protect set_visible_child_name from NULL stack
- Date: Thu, 19 Apr 2018 08:41:27 +0000 (UTC)
commit c15b64b7206e6c6d129b5d732878bc61221390d5
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
(cherry picked from commit 2ee5aee4a9f01cce3dda7dff877070b62c3e2880)
gtk/gtkstack.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index b508aee659..34f5491c48 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1670,6 +1670,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]