aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-view-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/addressbook/e-book-shell-view-actions.c')
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index 50834113c9..2c174a3545 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -263,10 +263,12 @@ map_window_show_contact_editor_cb (EContactMapWindow *window,
book_shell_sidebar = book_shell_view->priv->book_shell_sidebar;
selector = e_book_shell_sidebar_get_selector (book_shell_sidebar);
- source = e_source_selector_get_primary_selection (selector);
-
+ source = e_source_selector_ref_primary_selection (selector);
g_return_if_fail (source != NULL);
+
book_client = e_book_client_new (source, &error);
+ g_object_unref (source);
+
if (error) {
g_warning ("Error loading addressbook: %s", error->message);
g_error_free (error);
@@ -312,10 +314,12 @@ action_address_book_map_cb (GtkAction *action,
book_shell_sidebar = book_shell_view->priv->book_shell_sidebar;
selector = e_book_shell_sidebar_get_selector (book_shell_sidebar);
- source = e_source_selector_get_primary_selection (selector);
-
+ source = e_source_selector_ref_primary_selection (selector);
g_return_if_fail (source != NULL);
+
book_client = e_book_client_new (source, &error);
+ g_object_unref (source);
+
if (error != NULL) {
g_warning ("Error loading addressbook: %s", error->message);
g_error_free (error);