From 782f6b5a0985384b68f2a4f233eef0541efd4c94 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Wed, 2 Nov 2011 07:18:48 +0000 Subject: [PATCH] Fix warning if with non-existent cache paths --- src/data/grits-http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/grits-http.c b/src/data/grits-http.c index 19b751f..76e68a4 100644 --- a/src/data/grits-http.c +++ b/src/data/grits-http.c @@ -249,7 +249,7 @@ GList *grits_http_available(GritsHttp *http, const gchar *file; gchar *path = _get_cache_path(http, cache); GDir *dir = g_dir_open(path, 0, NULL); - while ((file = g_dir_read_name(dir))) + while (dir && (file = g_dir_read_name(dir))) if (g_regex_match(filter_re, file, 0, NULL)) files = g_list_prepend(files, g_strdup(file)); g_free(path); -- 2.43.2