[gnumeric] SheetObjectView: one more GocGroup::children access



commit d0137032065d2bcd642e5ec9e7a6ba5f9bd6c939
Author: Morten Welinder <terra gnome org>
Date:   Wed Jun 3 21:26:26 2020 -0400

    SheetObjectView: one more GocGroup::children access

 src/sheet-object-component.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/sheet-object-component.c b/src/sheet-object-component.c
index d02171447..5efd20a7c 100644
--- a/src/sheet-object-component.c
+++ b/src/sheet-object-component.c
@@ -491,12 +491,14 @@ sheet_object_component_set_component (SheetObject *so, GOComponent *component)
 
        soc->component = component;
 
-       for (; l; l = l->next)
-               if (l->data) {
-                       GocGroup *group = GOC_GROUP (l->data);
-                       if (group->children->data)
-                               g_object_set (group->children->data, "object", component, NULL);
+       for (; l; l = l->next) {
+               SheetObjectView *sov = l->data;
+               if (sov) {
+                       GocItem *item = sheet_object_view_get_item (sov);
+                       if (item)
+                               g_object_set (item, "object", component, NULL);
                }
+       }
        if (component) {
                g_object_ref (component);
                go_component_stop_editing (component);


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