variable selected. Add a valid predicate so that this can't
happen anyway.
+ * compute-dialog.c: Fix crash when trying to set label on non
+ existant variable.
+
2008-02-09 Ben Pfaff <blp@gnu.org>
Consolidate multiple messages into single message dialog. Patch
(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);
}