[tracker/tracker-0.12: 126/202] tracker-extract: Fix critical when FD list is missing



commit c7f3fb59cc540f14aeedcf81d922314b7b2be987
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Sep 27 17:10:08 2011 +0200

    tracker-extract: Fix critical when FD list is missing

 src/tracker-extract/tracker-controller.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-controller.c b/src/tracker-extract/tracker-controller.c
index 08d6266..552391e 100644
--- a/src/tracker-extract/tracker-controller.c
+++ b/src/tracker-extract/tracker-controller.c
@@ -688,7 +688,12 @@ handle_method_call_get_metadata_fast (TrackerController     *controller,
 
 		fd_list = g_dbus_message_get_unix_fd_list (method_message);
 
-		if ((fd = g_unix_fd_list_get (fd_list, index_fd, &error)) != -1) {
+		if (fd_list == NULL) {
+			error = g_error_new_literal (TRACKER_DBUS_ERROR, 0,
+				                     "No FD list");
+		}
+
+		if (fd_list && (fd = g_unix_fd_list_get (fd_list, index_fd, &error)) != -1) {
 			data = metadata_data_new (controller, uri, mime, invocation, request);
 			data->fd = fd;
 



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