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



commit bebaf4d172493a69e510207ea6769cefc95607b1
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

 .../services/documents/gdata-documents-document.c  |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/documents/gdata-documents-document.c b/gdata/services/documents/gdata-documents-document.c
index 1b83a1f..fae49e6 100644
--- a/gdata/services/documents/gdata-documents-document.c
+++ b/gdata/services/documents/gdata-documents-document.c
@@ -150,7 +150,8 @@ gdata_documents_document_download (GDataDocumentsDocument *self, GDataDocumentsS
 
 	/* Synchronously splice the data from the download stream to the file stream (network -> disk) */
 	src_stream = gdata_download_stream_new (_service, download_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]