diff options
author | Yoni Rabkin <yonirabkin@member.fsf.org> | 2014-10-13 20:11:10 -0400 |
---|---|---|
committer | Yoni Rabkin <yonirabkin@member.fsf.org> | 2014-10-13 20:11:10 -0400 |
commit | e03288e8d660e18cd55f5707447843212811c78f (patch) | |
tree | 9e46388ce1dc61d1f72ad46ac8e2943f12c98603 /src | |
parent | 22ca956b821e44802446d1ee8e412d6790ce17f4 (diff) |
* src/emms-print-metadata.c: Fix crash.
Short (4 lines) contrib from Arnaud Fontaine <arnau@debian.org>.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715864
also: https://vcs-git-viewer.duckcorp.org/?p=people/arnau/emms.git;a=commit;h=27825228ba9d62902b75c45b1ffee3893b22cea8
Diffstat (limited to 'src')
-rw-r--r-- | src/emms-print-metadata.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/emms-print-metadata.c b/src/emms-print-metadata.c index d04e759..d22fe96 100644 --- a/src/emms-print-metadata.c +++ b/src/emms-print-metadata.c @@ -29,6 +29,7 @@ main (int argc, char **argv) { TagLib_File *file; TagLib_Tag *tag; + const TagLib_AudioProperties *properties; if (argc != 2) { @@ -62,7 +63,10 @@ main (int argc, char **argv) printf ("info-year=%d\n", taglib_tag_year (tag)); printf ("info-genre=%s\n", taglib_tag_genre (tag)); printf ("info-note=%s\n", taglib_tag_comment (tag)); - printf ("info-playing-time=%d\n", taglib_audioproperties_length (taglib_file_audioproperties (file))); + + properties = taglib_file_audioproperties (file); + printf ("info-playing-time=%d\n", + properties ? taglib_audioproperties_length (properties) : 0); taglib_tag_free_strings (); taglib_file_free (file); |