[libgd] GdStack: return null if there is no visible child
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] GdStack: return null if there is no visible child
- Date: Sat, 16 Feb 2013 16:26:28 +0000 (UTC)
commit ea1fafa476d2fe06f76b40d082394d630c5a7b90
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Feb 16 17:05:10 2013 +0100
GdStack: return null if there is no visible child
libgd/gd-stack.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgd/gd-stack.c b/libgd/gd-stack.c
index 788050b..0d3a1b8 100644
--- a/libgd/gd-stack.c
+++ b/libgd/gd-stack.c
@@ -600,6 +600,7 @@ gd_stack_add (GtkContainer *container,
{
gd_stack_add_named (GD_STACK (container), child, NULL);
}
+
static void
gd_stack_remove (GtkContainer *container,
GtkWidget *child)
@@ -701,7 +702,7 @@ gd_stack_get_visible_child (GdStack *stack)
{
g_return_val_if_fail (stack != NULL, NULL);
- return stack->priv->visible_child->widget;
+ return stack->priv->visible_child ? stack->priv->visible_child->widget : NULL;
}
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]