[gnome-settings-daemon/gnome-3-8] housekeeping: Fix warnings when info cannot be gathered



commit 63915a0a90604370642ee5725196c4f92593ae90
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 16 18:30:06 2014 +0200

    housekeeping: Fix warnings when info cannot be gathered

 plugins/housekeeping/gsd-disk-space.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 951074d..a03b734 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -245,6 +245,8 @@ should_purge_file (GFile        *file,
                                   G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
                                   cancellable,
                                   NULL);
+        if (!info)
+                return FALSE;
 
         date = g_file_info_get_deletion_date (info);
         if (date == NULL) {


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