From: Andy Spencer Date: Wed, 2 Nov 2011 07:18:48 +0000 (+0000) Subject: Fix warning if with non-existent cache paths X-Git-Tag: v0.6~1 X-Git-Url: http://pileus.org/git/?p=grits;a=commitdiff_plain;h=782f6b5a0985384b68f2a4f233eef0541efd4c94 Fix warning if with non-existent cache paths --- 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);