# HG changeset patch # User zas_ # Date 1225819606 0 # Node ID 6ca88a8380d4c6c9c28913a8976ae73a96caaee0 # Parent 822d98c18062289810548fa79d82a12520855192 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. diff -r 822d98c18062 -r 6ca88a8380d4 src/bar_info.c --- 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; }