X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=c7cfaebe8df57e334f93fbb82e14a576a64ec557;hb=32ea29485bdd610b7d05dd806c5f06f68da0f0fe;hp=7fc951d3cdeff0a7252bc3cb4de5f1a1ae79effe;hpb=3079a93f224dfc9d0fa8638ccba7a2faac900977;p=pspp diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 7fc951d3cd..c7cfaebe8d 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -40,7 +40,6 @@ #include #include "psppire-data-store.h" -#include "psppire.h" #include "gl/configmake.h" #include "xalloc.h" @@ -156,7 +155,14 @@ text_to_value__ (const gchar *text, } value_init (val, width); - free (data_in (ss_cstr (text), UTF8, format->type, val, width, encoding)); + char *err = data_in (ss_cstr (text), UTF8, format->type, val, width, encoding); + + if (err) + { + value_destroy (val, width); + val = NULL; + free (err); + } return val; } @@ -283,7 +289,7 @@ clone_list_store (const GtkListStore *src) -static gboolean +static gboolean on_delete (GtkWindow *window, GdkEvent *e, GtkWindow **addr) { *addr = NULL;