Fix crash when loading collection listing inexistent files.
[geeqie.git] / src / filedata.c
index e0d70f0..9478cf8 100644 (file)
@@ -1150,8 +1150,10 @@ FileData *file_data_new_group(const gchar *path_utf8)
        filelist_read_real(dir, &files, NULL, TRUE);
 
        fd = g_hash_table_lookup(file_data_pool, path_utf8);
-       g_assert(fd);
-       file_data_ref(fd);
+       if (fd)
+               {
+               file_data_ref(fd);
+               }
 
        filelist_free(files);
        g_free(dir);