comparison src/metadata.c @ 1687:9fef1cbc556e

fixed an use of uninitialized value
author nadvornik
date Tue, 30 Jun 2009 20:15:33 +0000
parents 59c72fd324ce
children f1e316c4cc4d
comparison
equal deleted inserted replaced
1686:59c72fd324ce 1687:9fef1cbc556e
332 332
333 metadata_pathl = path_from_utf8(fd->change->dest); 333 metadata_pathl = path_from_utf8(fd->change->dest);
334 334
335 have_keywords = g_hash_table_lookup_extended(fd->modified_xmp, KEYWORD_KEY, NULL, &keywords); 335 have_keywords = g_hash_table_lookup_extended(fd->modified_xmp, KEYWORD_KEY, NULL, &keywords);
336 have_comment = g_hash_table_lookup_extended(fd->modified_xmp, COMMENT_KEY, NULL, &comment_l); 336 have_comment = g_hash_table_lookup_extended(fd->modified_xmp, COMMENT_KEY, NULL, &comment_l);
337 comment = comment_l ? ((GList *)comment_l)->data : NULL; 337 comment = (have_comment && comment_l) ? ((GList *)comment_l)->data : NULL;
338 338
339 if (!have_keywords || !have_comment) metadata_file_read(metadata_pathl, &orig_keywords, &orig_comment); 339 if (!have_keywords || !have_comment) metadata_file_read(metadata_pathl, &orig_keywords, &orig_comment);
340 340
341 success = metadata_file_write(metadata_pathl, 341 success = metadata_file_write(metadata_pathl,
342 have_keywords ? (GList *)keywords : orig_keywords, 342 have_keywords ? (GList *)keywords : orig_keywords,