manager: prevent a segfault when opening edit dialog with no sources connected

This commit is contained in:
Georges Basile Stavracas Neto
2015-01-13 17:10:39 -02:00
parent 5423280398
commit 17e5327cf4
+3
View File
@@ -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));
}