Fix for the assertion when file gives an empty lookup
authorLeon Winter <winter@bfw-online.de>
Mon, 26 May 2014 22:33:52 +0000 (23:33 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Mon, 26 May 2014 22:35:22 +0000 (23:35 +0100)
Thanks Leon for this patch.

src/filedata.c

index e0d70f0..15e2017 100644 (file)
@@ -1150,7 +1150,7 @@ 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);
        filelist_read_real(dir, &files, NULL, TRUE);
 
        fd = g_hash_table_lookup(file_data_pool, path_utf8);
-       g_assert(fd);
+       if (!fd) fd = file_data_new(path_utf8, &st, TRUE);
        file_data_ref(fd);
 
        filelist_free(files);
        file_data_ref(fd);
 
        filelist_free(files);