[gnome-keyring/wip/gdbus: 19/23] dbus-error: check for error != NULL
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/gdbus: 19/23] dbus-error: check for error != NULL
- Date: Sun, 28 Jun 2015 18:46:37 +0000 (UTC)
commit 5205b170092225fc5964d3de970852d3573a6186
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]