From 11f75ee04cf958f03615a1bcc712bca16a4c32f7 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 26 May 2013 13:37:56 +0200 Subject: [PATCH] Independent Samples dialog: Avoid direct access to sealed widget members --- src/ui/gui/psppire-dialog-action-indep-samps.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ui/gui/psppire-dialog-action-indep-samps.c b/src/ui/gui/psppire-dialog-action-indep-samps.c index 72e57731b9..df38051149 100644 --- a/src/ui/gui/psppire-dialog-action-indep-samps.c +++ b/src/ui/gui/psppire-dialog-action-indep-samps.c @@ -151,13 +151,14 @@ run_define_groups (PsppireDialogActionIndepSamps *act) { gint response; PsppireDialogAction *da = PSPPIRE_DIALOG_ACTION (act); + GtkWidget *parent1 = gtk_widget_get_parent (act->dg_table1); + GtkWidget *parent2 = gtk_widget_get_parent (act->dg_table2); - if ( act->dg_table2->parent) - gtk_container_remove (GTK_CONTAINER (act->dg_table2->parent), act->dg_table2); - - if ( act->dg_table1->parent) - gtk_container_remove (GTK_CONTAINER (act->dg_table1->parent), act->dg_table1); + if (parent1) + gtk_container_remove (GTK_CONTAINER (parent1), act->dg_table1); + if (parent2) + gtk_container_remove (GTK_CONTAINER (parent2), act->dg_table2); if ( var_is_numeric (act->grp_var)) { -- 2.30.2