aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/tools
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/tools')
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
index 88923fd244..758ed42eb2 100644
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ b/addressbook/tools/evolution-addressbook-export-list-cards.c
@@ -590,7 +590,12 @@ output_n_cards_file (FILE * outputfile, GList *contacts, int size, int begin_no,
g_free (vcard);
}
} else if (format == CARD_FORMAT_CSV) {
- gchar *csv_fields_name = e_contact_csv_get_header_line (pre_defined_fields);
+ gchar *csv_fields_name;
+
+ if (!pre_defined_fields)
+ set_pre_defined_field (&pre_defined_fields);
+
+ csv_fields_name = e_contact_csv_get_header_line (pre_defined_fields);
fprintf (outputfile, "%s\n", csv_fields_name);
g_free (csv_fields_name);