diff --git a/save-xml.c b/save-xml.c index 0fdb39091..166885861 100644 --- a/save-xml.c +++ b/save-xml.c @@ -555,7 +555,7 @@ void save_dives_buffer(struct membuffer *b, const bool select_only) if (ds->taxonomy.nr) { for (int j = 0; j < ds->taxonomy.nr; j++) { struct taxonomy *t = &ds->taxonomy.category[j]; - if (t->category != TC_NONE) { + if (t->category != TC_NONE && t->value) { put_format(b, " category); put_format(b, " origin='%d'", t->origin); show_utf8(b, t->value, " value='", "'/>\n", 1);