Mercurial > geeqie.yaz
changeset 1090:6ca88a8380d4
Fix a segfault occuring when searching for comments in a directory where at least one photo doesn't have a comment. The fix modifies comment_read() function to return FALSE when a comment doesn't exist. Patch by Omari Stephens.
author | zas_ |
---|---|
date | Tue, 04 Nov 2008 17:26:46 +0000 |
parents | 822d98c18062 |
children | b6e7d5ce18a2 |
files | src/bar_info.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bar_info.c Tue Nov 04 17:11:53 2008 +0000 +++ b/src/bar_info.c Tue Nov 04 17:26:46 2008 +0000 @@ -462,6 +462,10 @@ } if (res1 && (!comment || *comment != comment1)) g_free(comment1); if (res2 && (!comment || *comment != comment2)) g_free(comment2); + + // return FALSE on failure + if (comment && !*comment) + return FALSE; return TRUE; }