[libgdata/libgdata-0-6] documents: Don't return a content type if a return location wasn't provided



commit 664b383effce331d347edb36d13b44e4e3b44327
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 9 18:16:56 2010 +0000

    documents: Don't return a content type if a return location wasn't provided

 gdata/services/documents/gdata-documents-entry.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/documents/gdata-documents-entry.c b/gdata/services/documents/gdata-documents-entry.c
index 26fcd92..1965a65 100644
--- a/gdata/services/documents/gdata-documents-entry.c
+++ b/gdata/services/documents/gdata-documents-entry.c
@@ -644,7 +644,8 @@ _gdata_documents_entry_download_document (GDataDocumentsEntry *self, GDataServic
 
 	/* Synchronously splice the data from the download stream to the file stream (network -> disk) */
 	src_stream = gdata_download_stream_new (GDATA_SERVICE (service), src_uri);
-	g_signal_connect (src_stream, "notify::content-type", (GCallback) notify_content_type_cb, content_type);
+	if (content_type != NULL)
+		g_signal_connect (src_stream, "notify::content-type", (GCallback) notify_content_type_cb, content_type);
 	g_output_stream_splice (G_OUTPUT_STREAM (dest_stream), src_stream,
 				G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, cancellable, &child_error);
 	g_object_unref (src_stream);



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