[libchamplain: 24/24] Unref the info only if it was valid



commit e3262d08756ed22341f9c5eadc2b2fc258ceeb9e
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Tue Feb 2 17:19:29 2010 -0500

    Unref the info only if it was valid

 champlain/champlain-file-cache.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index 4b16d41..3d492d0 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -573,9 +573,10 @@ fill_tile (ChamplainMapSource *map_source,
     {
       g_file_info_get_modification_time (info, &modified_time);
       champlain_tile_set_modified_time (tile, &modified_time);
+
+      g_object_unref (info);
     }
   g_object_unref (file);
-  g_object_unref (info);
 
   /* Notify other caches that the tile has been filled */
   if (CHAMPLAIN_IS_TILE_CACHE(next_source))



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