[gnome-calendar] manager: prevent a segfault when opening edit dialog with no sources connected
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: prevent a segfault when opening edit dialog with no sources connected
- Date: Tue, 13 Jan 2015 19:10:48 +0000 (UTC)
commit 17e5327cf467b0320b3836ecbb12e54a835b1c49
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jan 13 17:10:39 2015 -0200
manager: prevent a segfault when opening edit dialog with no sources connected
src/gcal-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 0bb7daf..ea04b66 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -934,6 +934,9 @@ gcal_manager_is_client_writable (GcalManager *manager,
priv = gcal_manager_get_instance_private (manager);
unit = g_hash_table_lookup (priv->clients, source);
+ if (unit == NULL)
+ return FALSE;
+
return unit->connected && e_client_is_readonly (E_CLIENT (unit->client));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]