vizml now accepts the whole corpus
[pspp] / src / output / spv / spv.c
index ecb008c9911fd5027f6a7f363889c0a850ac19a6..1d347fd1ad981ad0c83f278a2a5393328471cded 100644 (file)
@@ -665,7 +665,11 @@ spv_item_get_raw_legacy_data (const struct spv_item *item,
     return xstrdup ("not a graph or legacy table object");
 
   if (!item->bin_member)
-    return xstrdup ("graph or legacy table lacks legacy data");
+    {
+      *data = NULL;
+      *size = 0;
+      return NULL;
+    }
 
   return zip_member_read_all (item->spv->zip, item->bin_member, data, size);
 }
@@ -999,7 +1003,8 @@ spv_decode_container (const struct spvsx_container *c,
       item->type = SPV_ITEM_GRAPH;
 
       struct spvsx_graph *graph = spvsx_cast_graph (content);
-      item->bin_member = xstrdup_if_nonempty (graph->data_path->text);
+      if (graph->data_path)
+        item->bin_member = xstrdup_if_nonempty (graph->data_path->text);
       item->command_id = xstrdup_if_nonempty (graph->command_name);
       item->xml_member = xstrdup_if_nonempty (graph->path->text);
     }