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



commit db610ba08b606cbedec79b8ca0e7ee051b29b59a
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 9487095..3256070 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -244,6 +244,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]