aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/contact-editor
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-03 12:05:06 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-03 12:05:06 +0800
commitbb8ba48a852db03fd1575a2132a6c9413de069c8 (patch)
tree2f7233bac5dca6ae7c4499d9458c2677ae1a1761 /addressbook/contact-editor
parent2934ba8dca1dd1ae21c45e53783129a2685717b2 (diff)
downloadgsoc2013-evolution-bb8ba48a852db03fd1575a2132a6c9413de069c8.tar.gz
gsoc2013-evolution-bb8ba48a852db03fd1575a2132a6c9413de069c8.tar.zst
gsoc2013-evolution-bb8ba48a852db03fd1575a2132a6c9413de069c8.zip
Make sure this won't crash if the given contact is removed from the
2001-01-02 Christopher James Lahey <clahey@helixcode.com> * contact-editor/e-contact-editor.c (delete_cb): Make sure this won't crash if the given contact is removed from the database while this function is being called. * gui/widgets/e-minicard.c: Made sure this won't crash if the given contact is removed from the database while the right click menu is being displayed. svn path=/trunk/; revision=7227
Diffstat (limited to 'addressbook/contact-editor')
-rw-r--r--addressbook/contact-editor/e-contact-editor.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index bc8574e66a..125ab38767 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/contact-editor/e-contact-editor.c
@@ -716,18 +716,26 @@ static void
delete_cb (GtkWidget *widget, gpointer data)
{
EContactEditor *ce = E_CONTACT_EDITOR (data);
+ ECard *card = ce->card;
+ ECardSimple *simple = ce->simple;
+
+ gtk_object_ref(GTK_OBJECT(card));
+ gtk_object_ref(GTK_OBJECT(simple));
if (e_contact_editor_confirm_delete(GTK_WINDOW(ce->app))) {
extract_info (ce);
- e_card_simple_sync_card (ce->simple);
+ e_card_simple_sync_card (simple);
if (!ce->is_new_card)
gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[DELETE_CARD],
- ce->card);
+ card);
file_close_cb(widget, data);
}
+
+ gtk_object_unref(GTK_OBJECT(card));
+ gtk_object_unref(GTK_OBJECT(simple));
}
/* Emits the signal to request printing a card */