diff options
Diffstat (limited to 'addressbook/gui/component/addressbook-component.c')
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index f90df5f65a..b49dec3005 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -407,12 +407,17 @@ static void new_item_cb (EBook *book, gpointer closure) { gboolean is_list = GPOINTER_TO_INT (closure); + ECard *card; + if (book == NULL) return; + + card = e_card_new (""); if (is_list) - e_addressbook_show_contact_list_editor (book, e_card_new(""), TRUE, TRUE); + e_addressbook_show_contact_list_editor (book, card, TRUE, TRUE); else - e_addressbook_show_contact_editor (book, e_card_new(""), TRUE, TRUE); + e_addressbook_show_contact_editor (book, card, TRUE, TRUE); + g_object_unref (card); } static void |