X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv-legacy-decoder.c;h=f5b50e2502849f3a4988e4438bb36a5b73764be0;hb=5ce9c6ba1502e623ec6723a8273da77e5858b8d4;hp=d8ddb82e31340c2fa0a8b31f31feedccc9aa669d;hpb=da67dbb8a63ee516a6ae69c6099fde077dc20dcc;p=pspp diff --git a/src/output/spv/spv-legacy-decoder.c b/src/output/spv/spv-legacy-decoder.c index d8ddb82e31..f5b50e2502 100644 --- a/src/output/spv/spv-legacy-decoder.c +++ b/src/output/spv/spv-legacy-decoder.c @@ -1427,11 +1427,11 @@ apply_styles_to_value (struct pivot_table *table, { if (sf) { - if (sf->reset > 0) + if (sf->reset > 0 && value->ex) { - free (value->footnote_indexes); - value->footnote_indexes = NULL; - value->n_footnotes = 0; + free (value->ex->footnote_indexes); + value->ex->footnote_indexes = NULL; + value->ex->n_footnotes = 0; } struct fmt_spec format = { .w = 0 }; @@ -1476,11 +1476,12 @@ apply_styles_to_value (struct pivot_table *table, } if (fg || bg) { + const struct pivot_value_ex *ex = pivot_value_ex (value); struct table_area_style area; pivot_value_get_style ( value, - value->font_style ? value->font_style : &base_area_style->font_style, - value->cell_style ? value->cell_style : &base_area_style->cell_style, + ex->font_style ? ex->font_style : &base_area_style->font_style, + ex->cell_style ? ex->cell_style : &base_area_style->cell_style, &area); decode_spvdx_style_incremental (fg, bg, &area); pivot_value_set_style (value, &area); @@ -1996,7 +1997,7 @@ decode_spvdx_table (const struct spvdx_visualization *v, const char *subtype, if (value->type == PIVOT_VALUE_NUMERIC && value->numeric.x == SYSMIS - && !value->n_footnotes) + && !pivot_value_ex (value)->n_footnotes) { /* Apparently, system-missing values are just empty cells? */ pivot_value_destroy (value);