Commit 4a6b8ddb authored by Johannes Schmid's avatar Johannes Schmid Committed by Tristan Van Berkom
Browse files

glade-widget: Add a g_return_if_fail() if we cannot find an apator for widgets

Also checks in glade-project.c if we found a widget.
parent 3e9ef432
......@@ -4532,6 +4532,8 @@ glade_project_model_iter_children (GtkTreeModel* model,
if (parent)
{
GladeWidget* widget = glade_widget_get_from_gobject (parent->user_data);
if (widget)
return FALSE;
GList* children = glade_widget_get_children (widget);
if (children)
{
......
......@@ -3448,12 +3448,15 @@ glade_widget_set_parent (GladeWidget *widget,
* Returns: The children of widget
*/
GList *
glade_widget_get_children (GladeWidget* widget)
glade_widget_get_children (GladeWidget *widget)
{
GladeWidgetAdaptor* adaptor = glade_widget_get_adaptor (widget);
GList* children = NULL;
GList* node;
GladeWidgetAdaptor *adaptor;
GList *children = NULL;
GList *node;
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
adaptor = glade_widget_get_adaptor (widget);
children = glade_widget_adaptor_get_children (adaptor, widget->object);
for (node = children; node != NULL; node = g_list_next (node))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment