[grits] Fix warning if with non-existent cache paths
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Fix warning if with non-existent cache paths
- Date: Tue, 3 Jan 2012 01:20:14 +0000 (UTC)
commit 782f6b5a0985384b68f2a4f233eef0541efd4c94
Author: Andy Spencer <andy753421 gmail com>
Date: Wed Nov 2 07:18:48 2011 +0000
Fix warning if with non-existent cache paths
src/data/grits-http.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]