[gtk+] GtkAssistant: Avoid a crash



commit 386f1d14f0de015cdb071f0bf7332c8c5dbf3154
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 18 00:02:59 2014 -0400

    GtkAssistant: Avoid a crash
    
    The child properties in GtkAssistant are somewhat broken, since
    they are not on direct children - but that is no reason to crash
    if somebody does ask for child properties of direct children.

 gtk/gtkassistant.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 4847a65..5ad8648 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -1264,12 +1264,16 @@ gtk_assistant_get_child_property (GtkContainer *container,
                           gtk_assistant_get_page_title (assistant, child));
       break;
     case CHILD_PROP_PAGE_HEADER_IMAGE:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_value_set_object (value,
-                          ((GtkAssistantPage*) find_page (assistant, child))->header_image);
+                          gtk_assistant_get_page_header_image (assistant, child));
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case CHILD_PROP_PAGE_SIDEBAR_IMAGE:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_value_set_object (value,
-                          ((GtkAssistantPage*) find_page (assistant, child))->sidebar_image);
+                          gtk_assistant_get_page_side_image (assistant, child));
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case CHILD_PROP_PAGE_COMPLETE:
       g_value_set_boolean (value,


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