diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-11-10 11:40:00 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-11-11 04:54:43 +0800 |
commit | 2c4ae5e7685c462f8d464448e4617b8dea029e72 (patch) | |
tree | c34f0cbb7c500ff70f10fce846631b0a948b341c /calendar/alarm-notify/alarm-notify.c | |
parent | 583da46b8caf4b2a8b548b03c38fe0e84164abfb (diff) | |
download | gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.gz gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.zst gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar/alarm-notify/alarm-notify.c')
-rw-r--r-- | calendar/alarm-notify/alarm-notify.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/calendar/alarm-notify/alarm-notify.c b/calendar/alarm-notify/alarm-notify.c index dc588b726c..54242f2049 100644 --- a/calendar/alarm-notify/alarm-notify.c +++ b/calendar/alarm-notify/alarm-notify.c @@ -235,10 +235,17 @@ client_opened_cb (GObject *source_object, e_client_utils_open_new_finish (source, result, &client, &error); - if (client == NULL) { - debug (("Failed to open '%s' (%s): %s", e_source_get_display_name (source), - e_source_get_uid (source), error ? error->message : "Unknown error")); - g_clear_error (&error); + /* Sanity check. */ + g_return_if_fail ( + ((client != NULL) && (error == NULL)) || + ((client == NULL) && (error != NULL))); + + if (error != NULL) { + debug ( + ("Failed to open '%s' (%s): %s", + e_source_get_display_name (source), + e_source_get_uid (source), error->message)); + g_error_free (error); return; } |