aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-01-10 09:38:32 +0800
committerChris Toshok <toshok@src.gnome.org>2003-01-10 09:38:32 +0800
commit50a352b3670e6b8e8d29a9559d2442fcf0b62c5e (patch)
tree0521754c1b2b75b958244ee930514fcc94791594
parentfd67bd851b0a590aff334faf1889a5c0804f869a (diff)
downloadgsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar.gz
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar.bz2
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar.lz
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar.xz
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.tar.zst
gsoc2013-evolution-50a352b3670e6b8e8d29a9559d2442fcf0b62c5e.zip
deal with backends that might not have loaded successfully (they'll have a
2003-01-09 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book-factory.c (backend_last_client_gone_cb): deal with backends that might not have loaded successfully (they'll have a NULL uri). svn path=/trunk/; revision=19385
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/backend/pas/pas-book-factory.c25
2 files changed, 19 insertions, 12 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 49f1a59978..8dacf693d9 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,11 @@
2003-01-09 Chris Toshok <toshok@ximian.com>
+ * backend/pas/pas-book-factory.c (backend_last_client_gone_cb):
+ deal with backends that might not have loaded successfully
+ (they'll have a NULL uri).
+
+2003-01-09 Chris Toshok <toshok@ximian.com>
+
* gui/component/select-names/e-select-names-bonobo.c
(e_select_names_bonobo_new): call e_select_names_bonobo_construct
on the newly created object.
diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c
index e775553958..5a258edcfe 100644
--- a/addressbook/backend/pas/pas-book-factory.c
+++ b/addressbook/backend/pas/pas-book-factory.c
@@ -143,29 +143,30 @@ backend_last_client_gone_cb (PASBackend *backend, gpointer data)
{
PASBookFactory *factory;
const char *uri;
- gpointer orig_key;
- gboolean result;
- char *orig_uri;
factory = PAS_BOOK_FACTORY (data);
/* Remove the backend from the active server map */
uri = pas_backend_get_uri (backend);
- g_assert (uri != NULL);
+ if (uri) {
+ gpointer orig_key;
+ gboolean result;
+ char *orig_uri;
- result = g_hash_table_lookup_extended (factory->priv->active_server_map, uri,
- &orig_key, NULL);
- g_assert (result != FALSE);
+ result = g_hash_table_lookup_extended (factory->priv->active_server_map, uri,
+ &orig_key, NULL);
+ g_assert (result != FALSE);
- orig_uri = orig_key;
+ orig_uri = orig_key;
- g_hash_table_remove (factory->priv->active_server_map, orig_uri);
- g_free (orig_uri);
+ g_hash_table_remove (factory->priv->active_server_map, orig_uri);
+ g_free (orig_uri);
- g_object_unref (backend);
+ g_object_unref (backend);
- /* Notify upstream if there are no more backends */
+ /* Notify upstream if there are no more backends */
+ }
if (g_hash_table_size (factory->priv->active_server_map) == 0)
g_signal_emit (G_OBJECT (factory), factory_signals[LAST_BOOK_GONE], 0);