aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index d74b78b9f7..3bd1780a05 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2741,6 +2741,8 @@ real_save_contact (EContactEditor *ce, gboolean should_close)
static void
save_contact (EContactEditor *ce, gboolean should_close)
{
+ char *uid;
+
if (!ce->target_book)
return;
@@ -2752,11 +2754,16 @@ save_contact (EContactEditor *ce, gboolean should_close)
extract_all (ce);
if (!e_contact_editor_is_valid (EAB_EDITOR (ce))) {
+ uid = e_contact_get (ce->contact, E_CONTACT_UID);
g_object_unref (ce->contact);
ce->contact = e_contact_new ();
+ if (uid) {
+ e_contact_set (ce->contact, E_CONTACT_UID, uid);
+ g_free (uid);
+ }
return;
}
-
+
real_save_contact (ce, should_close);
}