[tracker] libtracker-data: Fix crash when flushing update buffer



commit 95455faefdae6904b71c071c7e694c2bb4acbecf
Author: Jürg Billeter <j bitron ch>
Date:   Mon Aug 31 18:19:29 2009 +0200

    libtracker-data: Fix crash when flushing update buffer

 src/libtracker-data/tracker-data-update.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 9326ec8..932a0bd 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -345,6 +345,11 @@ tracker_data_update_buffer_flush (void)
 
 	iface = tracker_db_manager_get_db_interface ();
 
+	if (update_buffer.subject == NULL) {
+		/* nothing to flush */
+		return;
+	}
+
 	if (update_buffer.new_subject != NULL) {
 		/* change uri of resource */
 		stmt = tracker_db_interface_create_statement (iface,



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