[tracker/tracker-0.12] libtracker-extract: Fix mockup example which unrefs TrackerExtractInfo->GFile



commit d6fadbebcc3cdfd19ceabdbf8191c11763920b44
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Dec 15 16:01:56 2011 +0000

    libtracker-extract: Fix mockup example which unrefs TrackerExtractInfo->GFile
    
    This is not returned as a new reference.

 .../libtracker-extract/tracker-extract-mockup.c    |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/examples/libtracker-extract/tracker-extract-mockup.c b/examples/libtracker-extract/tracker-extract-mockup.c
index f476861..5fef866 100644
--- a/examples/libtracker-extract/tracker-extract-mockup.c
+++ b/examples/libtracker-extract/tracker-extract-mockup.c
@@ -74,6 +74,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
 	metadata = tracker_extract_info_get_metadata_builder (info_);
 	preupdate = tracker_extract_info_get_preupdate_builder (info_);
 
+	/* NOTE: File is not ref'd, so don't unref */
 	file = tracker_extract_info_get_file (info_);
 	filename = g_file_get_path (file);
 	info = g_file_query_info (file,
@@ -93,8 +94,6 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
 		g_object_unref (info);
 	}
 
-	g_object_unref (file);
-
 	/* TODO: Do any pre-checks on the file
 	 * (i.e check file size so we don't handle files of 0 size)
 	 */



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