Bug fix: Glib Critical error when no configuration file
authorColin Clark <colin.clark@cclark.uk>
Sat, 18 Mar 2023 15:28:43 +0000 (15:28 +0000)
committerColin Clark <colin.clark@cclark.uk>
Sat, 18 Mar 2023 15:28:43 +0000 (15:28 +0000)
If geeqierc.xml does not exist, there is a critical error -
file_data_pool is not initialized.

src/filedata.cc

index daaabf7..c7d178f 100644 (file)
@@ -1489,6 +1489,11 @@ FileData *file_data_new_group(const gchar *path_utf8)
        FileData *fd;
        GList *files;
 
+       if (!file_data_pool)
+               {
+               file_data_pool = g_hash_table_new(g_str_hash, g_str_equal);
+               }
+
        if (!stat_utf8(path_utf8, &st))
                {
                st.st_size = 0;