summaryrefslogtreecommitdiff
path: root/gdata/gdata-service.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2011-08-20 17:38:20 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2011-08-20 17:44:20 +0100
commitdb6ee229558fcd749fc2e6ea2b2fb26bfa46d082 (patch)
tree04e8a7f1dfb549d342acf9034a13fc037ac1c0ad /gdata/gdata-service.c
parent9e3042ef261a2972b2f882f9a71e5cf5a696f4fc (diff)
downloadlibgdata-db6ee229558fcd749fc2e6ea2b2fb26bfa46d082.tar.gz
core: Fix a NULL pointer ref. inc. in GDataService
Diffstat (limited to 'gdata/gdata-service.c')
-rw-r--r--gdata/gdata-service.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 0a9c47f3..a082668b 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -285,9 +285,12 @@ real_append_query_headers (GDataService *self, GDataAuthorizationDomain *domain,
if (self->priv->authorizer != NULL) {
gdata_authorizer_process_request (self->priv->authorizer, domain, message);
- /* Store the authorisation domain on the message so that we can access it again after refreshing authorisation if necessary.
- * See _gdata_service_send_message(). */
- g_object_set_data_full (G_OBJECT (message), "gdata-authorization-domain", g_object_ref (domain), (GDestroyNotify) g_object_unref);
+ if (domain != NULL) {
+ /* Store the authorisation domain on the message so that we can access it again after refreshing authorisation if necessary.
+ * See _gdata_service_send_message(). */
+ g_object_set_data_full (G_OBJECT (message), "gdata-authorization-domain", g_object_ref (domain),
+ (GDestroyNotify) g_object_unref);
+ }
}
/* Set the GData-Version header to tell it we want to use the v2 API */