From: Andy Spencer Date: Tue, 14 Feb 2012 18:17:19 +0000 (+0000) Subject: Fix run-time warning when closing NULL dir X-Git-Tag: v0.7~1 X-Git-Url: http://pileus.org/git/?p=grits;a=commitdiff_plain;h=7a4b9a5dd98bf84808cf49b5639df27337b5e382 Fix run-time warning when closing NULL dir --- diff --git a/src/data/grits-http.c b/src/data/grits-http.c index 76e68a4..01bc705 100644 --- a/src/data/grits-http.c +++ b/src/data/grits-http.c @@ -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 */