X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-store.c;h=8832e5175e73160989175ff255be8c9dc73af7c7;hb=d6fb2728eb8a99e89165c45d8e5d4a482114d3a0;hp=732398511907686a8aa900dbe29e329bc1d6aea7;hpb=6d0d055e9336d05a3efca53d551eb905bd956e72;p=pspp diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 7323985119..8832e5175e 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2006, 2008, 2009, 2010, 2011, 2012 Free Software Foundation + Copyright (C) 2006, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -226,7 +226,10 @@ resize_datum (const union value *old, union value *new, const void *aux_) const char *enc = dict_get_encoding (aux->dict); const struct fmt_spec *newfmt = var_get_print_format (aux->new_variable); char *s = data_out (old, enc, var_get_print_format (aux->old_variable)); - free (data_in (ss_cstr (s), enc, newfmt->type, new, new_width, enc)); + enum fmt_type type = (fmt_usable_for_input (newfmt->type) + ? newfmt->type + : FMT_DOLLAR); + free (data_in (ss_cstr (s), enc, type, new, new_width, enc)); free (s); } @@ -390,6 +393,7 @@ psppire_data_store_dispose (GObject *object) if (ds->dispose_has_run) return; + psppire_data_store_set_dictionary (ds, NULL); /* must chain up */ (* parent_class->dispose) (object);