X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fcollect.c;h=e3c015719b9d3c86b98546284afb277a28bb88e8;hp=c69155dc410e1b791bc89918f9cf8dfa3a369f91;hb=11b6ce5218bca998f5a9a6b24fc5ce1beb87412d;hpb=cf90f247aceadb444297c3c66e2215e8c209ca69 diff --git a/src/collect.c b/src/collect.c index c69155dc..e3c01571 100644 --- a/src/collect.c +++ b/src/collect.c @@ -595,6 +595,10 @@ gboolean collection_add_check(CollectionData *cd, FileData *fd, gboolean sorted, struct stat st; gboolean valid; + if (!fd) return FALSE; + + g_assert(fd->magick == FD_MAGICK); + if (must_exist) { valid = (stat_utf8(fd->path, &st) && !S_ISDIR(st.st_mode));