From: John Darrington Date: Sun, 26 May 2013 11:37:56 +0000 (+0200) Subject: Independent Samples dialog: Avoid direct access to sealed widget members X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11f75ee04cf958f03615a1bcc712bca16a4c32f7;p=pspp Independent Samples dialog: Avoid direct access to sealed widget members --- 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)) {