diff options
Diffstat (limited to 'src/main/extractor_print.c')
-rw-r--r-- | src/main/extractor_print.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/main/extractor_print.c b/src/main/extractor_print.c index 6170cd6..e496b70 100644 --- a/src/main/extractor_print.c +++ b/src/main/extractor_print.c | |||
@@ -59,12 +59,19 @@ EXTRACTOR_meta_data_print(void * handle, | |||
59 | if (cd == (iconv_t) -1) | 59 | if (cd == (iconv_t) -1) |
60 | return 1; | 60 | return 1; |
61 | buf = iconv_helper(cd, data); | 61 | buf = iconv_helper(cd, data); |
62 | ret = fprintf(handle, | 62 | if (buf != NULL) |
63 | "%s - %s\n", | 63 | { |
64 | dgettext ("libextractor", | 64 | ret = fprintf(handle, |
65 | EXTRACTOR_metatype_to_string (type)), | 65 | "%s - %s\n", |
66 | buf); | 66 | dgettext ("libextractor", |
67 | free(buf); | 67 | EXTRACTOR_metatype_to_string (type)), |
68 | buf); | ||
69 | free(buf); | ||
70 | } | ||
71 | else | ||
72 | { | ||
73 | ret = -1; | ||
74 | } | ||
68 | iconv_close(cd); | 75 | iconv_close(cd); |
69 | if (ret < 0) | 76 | if (ret < 0) |
70 | return 1; | 77 | return 1; |