[dconf/wip/reorg] GDBus backend: only write to error if non-NULL



commit b332aa9ef1a5425a8f2213289e00a38e3c9ee868
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jul 5 23:33:42 2012 -0400

    GDBus backend: only write to error if non-NULL
    
    Convention says GError ** can be NULL, so we better check for that.

 gdbus/dconf-gdbus-thread.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdbus/dconf-gdbus-thread.c b/gdbus/dconf-gdbus-thread.c
index c4a851d..14183d0 100644
--- a/gdbus/dconf-gdbus-thread.c
+++ b/gdbus/dconf-gdbus-thread.c
@@ -157,7 +157,8 @@ dconf_gdbus_get_bus_common (GBusType       bus_type,
 {
   if (dconf_gdbus_get_bus_is_error[bus_type])
     {
-      *error = dconf_gdbus_get_bus_data[bus_type];
+      if (error)
+        *error = dconf_gdbus_get_bus_data[bus_type];
 
       return NULL;
     }



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