diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2010-12-09 18:16:56 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2010-12-11 00:41:14 +0000 |
commit | 664b383effce331d347edb36d13b44e4e3b44327 (patch) | |
tree | 6088816b46da12d671b65dbda9c3954b62f3ce6e | |
parent | 06f1ba9b8a85b09e2a76004008129d004ec93900 (diff) | |
download | libgdata-664b383effce331d347edb36d13b44e4e3b44327.tar.gz |
documents: Don't return a content type if a return location wasn't provided
-rw-r--r-- | 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 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); |