aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/alarm-notify/alarm-notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/alarm-notify/alarm-notify.c')
-rw-r--r--calendar/alarm-notify/alarm-notify.c15
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;
}