# HG changeset patch # User nadvornik # Date 1246392933 0 # Node ID 9e168ba1b0b923dc27ef4543be946fa2b91ec7f3 # Parent ece97f3f2305accfebbe8d97a050d7d06566eda7 fixed an use of uninitialized value diff -r ece97f3f2305 -r 9e168ba1b0b9 src/metadata.c --- a/src/metadata.c Tue Jun 30 20:12:28 2009 +0000 +++ b/src/metadata.c Tue Jun 30 20:15:33 2009 +0000 @@ -336,7 +336,7 @@ have_keywords = g_hash_table_lookup_extended(fd->modified_xmp, KEYWORD_KEY, NULL, &keywords); have_comment = g_hash_table_lookup_extended(fd->modified_xmp, COMMENT_KEY, NULL, &comment_l); - comment = comment_l ? ((GList *)comment_l)->data : NULL; + comment = (have_comment && comment_l) ? ((GList *)comment_l)->data : NULL; if (!have_keywords || !have_comment) metadata_file_read(metadata_pathl, &orig_keywords, &orig_comment);