Make the default view the variable view instead of the data view
[pspp] / src / ui / gui / helper.c
index d453f2a66593e79548e95e7a8d5b62d478a821d5..c7cfaebe8df57e334f93fbb82e14a576a64ec557 100644 (file)
@@ -155,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;
 }
@@ -282,7 +289,7 @@ clone_list_store (const GtkListStore *src)
 
 
 
-static gboolean 
+static gboolean
 on_delete (GtkWindow *window, GdkEvent *e, GtkWindow **addr)
 {
   *addr = NULL;