]> Pileus Git - grits/commitdiff
Fix run-time warning when closing NULL dir
authorAndy Spencer <andy753421@gmail.com>
Tue, 14 Feb 2012 18:17:19 +0000 (18:17 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 14 Feb 2012 18:17:19 +0000 (18:17 +0000)
src/data/grits-http.c

index 76e68a4aa2935dd79b039ffe67f027cf0b7b9756..01bc7053b61504f3c6b8981604ec444263b23871 100644 (file)
@@ -253,7 +253,8 @@ GList *grits_http_available(GritsHttp *http,
                        if (g_regex_match(filter_re, file, 0, NULL))
                                files = g_list_prepend(files, g_strdup(file));
                g_free(path);
-               g_dir_close(dir);
+               if (dir)
+                       g_dir_close(dir);
        }
 
        /* Add online files if online */