[gnome-online-accounts] provider: Silence warnings when setting :preseed-data to NULL



commit cfd713855cf347145cf91ad6851e894714984bcb
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Wed Mar 13 13:35:16 2013 +0100

    provider: Silence warnings when setting :preseed-data to NULL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695768

 src/goabackend/goaprovider.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 4ed00b6..6093017 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -894,7 +894,8 @@ goa_provider_set_preseed_data (GoaProvider *provider,
                                GVariant    *preseed_data)
 {
   g_clear_pointer (&provider->priv->preseed_data, g_variant_unref);
-  provider->priv->preseed_data = g_variant_ref_sink (preseed_data);
+  if (preseed_data != NULL)
+    provider->priv->preseed_data = g_variant_ref_sink (preseed_data);
   g_object_notify (G_OBJECT (provider), "preseed-data");
 }
 


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