From 664b383effce331d347edb36d13b44e4e3b44327 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 9 Dec 2010 18:16:56 +0000 Subject: documents: Don't return a content type if a return location wasn't provided --- gdata/services/documents/gdata-documents-entry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdata/services/documents/gdata-documents-entry.c b/gdata/services/documents/gdata-documents-entry.c index 26fcd922..1965a652 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); -- cgit v1.2.1