[grits] Fix run-time warning when closing NULL dir



commit 7a4b9a5dd98bf84808cf49b5639df27337b5e382
Author: Andy Spencer <andy753421 gmail com>
Date:   Tue Feb 14 18:17:19 2012 +0000

    Fix run-time warning when closing NULL dir

 src/data/grits-http.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]