[tracker/tracker-0.12: 121/202] libtracker-extract: Do not pass NULL to tracker_sparql_builder_prepend



commit ae94d299d1bfa6114b122b8e6bae925fbda18457
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Sep 27 16:14:05 2011 +0200

    libtracker-extract: Do not pass NULL to tracker_sparql_builder_prepend

 src/libtracker-extract/tracker-extract-client.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-extract-client.c b/src/libtracker-extract/tracker-extract-client.c
index 50d641f..a59f5ac 100644
--- a/src/libtracker-extract/tracker-extract-client.c
+++ b/src/libtracker-extract/tracker-extract-client.c
@@ -273,13 +273,19 @@ get_metadata_fast_cb (void     *buffer,
 			}
 		}
 
-		tracker_extract_info_set_where_clause (data->info, where);
+		if (where) {
+			tracker_extract_info_set_where_clause (data->info, where);
+		}
 
-		builder = tracker_extract_info_get_preupdate_builder (data->info);
-		tracker_sparql_builder_prepend (builder, preupdate);
+		if (preupdate) {
+			builder = tracker_extract_info_get_preupdate_builder (data->info);
+			tracker_sparql_builder_prepend (builder, preupdate);
+		}
 
-		builder = tracker_extract_info_get_metadata_builder (data->info);
-		tracker_sparql_builder_prepend (builder, sparql);
+		if (sparql) {
+			builder = tracker_extract_info_get_metadata_builder (data->info);
+			tracker_sparql_builder_prepend (builder, sparql);
+		}
 
 		g_simple_async_result_set_op_res_gpointer (data->res,
 		                                           tracker_extract_info_ref (data->info),



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