[gnome-keyring/wip/gdbus: 7/9] dbus-error: check for error != NULL



commit 0e55eae2b262385683307015a04a79d3175d7884
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Nov 14 13:43:58 2014 -0800

    dbus-error: check for error != NULL
    
    It's a programmer error to call this without a GError.

 daemon/dbus/gkd-secret-error.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-error.c b/daemon/dbus/gkd-secret-error.c
index de286c4..6beb5e3 100644
--- a/daemon/dbus/gkd-secret-error.c
+++ b/daemon/dbus/gkd-secret-error.c
@@ -68,6 +68,8 @@ gkd_secret_propagate_error (GDBusMethodInvocation *invocation,
                             const gchar *description,
                             GError *error)
 {
+       g_return_if_fail (error != NULL);
+
        if (g_error_matches (error, GCK_ERROR, CKR_USER_NOT_LOGGED_IN) ||
            g_error_matches (error, GCK_ERROR, CKR_PIN_INCORRECT)) {
                g_dbus_method_invocation_return_error_literal (invocation,


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