X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcompute-dialog.c;h=9eafc2c2b84e3be47dab73660a088fbc9c4e17e7;hb=f606d3c31ea117f7b9cb187f3521c7051a8db2ba;hp=3e8677ba48fd95863555e9bb84de59ef30b7146f;hpb=6882ff1359de0c4812a62e1bfcdfbf8e68474de5;p=pspp diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 3e8677ba48..9eafc2c2b8 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -325,10 +325,15 @@ on_expression_toggle (GtkToggleButton *button, gpointer data) (GTK_ENTRY (get_widget_assert (cd->xml, "compute-entry1"))); target_var = psppire_dict_lookup_var (cd->dict, target_name); - label = var_get_label (target_var); + if ( target_var ) + { + label = var_get_label (target_var); - if ( label ) - gtk_entry_set_text (GTK_ENTRY (entry), label); + if ( label ) + gtk_entry_set_text (GTK_ENTRY (entry), label); + } + else + gtk_entry_set_text (GTK_ENTRY (entry), ""); gtk_widget_set_sensitive (entry, TRUE); }