From 8bc92f7dc73512569861fc8b9c495fe0a836ad27 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Fri, 26 Oct 2001 19:14:42 +0000 Subject: Don't assert, but check if ce->app != NULL, since this function can 2001-10-26 Jon Trowbridge * gui/contact-editor/e-contact-editor.c (close_dialog): Don't assert, but check if ce->app != NULL, since this function can (apparently) get called multiple times. svn path=/trunk/; revision=14162 --- addressbook/ChangeLog | 4 ++++ addressbook/gui/contact-editor/e-contact-editor.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 052af8d619..23c808a9e7 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,9 @@ 2001-10-26 Jon Trowbridge + * gui/contact-editor/e-contact-editor.c (close_dialog): Don't + assert, but check if ce->app != NULL, since this function can + (apparently) get called multiple times. + * gui/contact-editor/e-contact-save-as.c (file_exists): Remove bad dialog ref-counting crap. diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 30835ce19b..c60ad8abe1 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -894,12 +894,11 @@ save_card (EContactEditor *ce, gboolean should_close) static void close_dialog (EContactEditor *ce) { - g_assert (ce->app != NULL); - - gtk_widget_destroy (ce->app); - ce->app = NULL; - - gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[EDITOR_CLOSED]); + if (ce->app != NULL) { + gtk_widget_destroy (ce->app); + ce->app = NULL; + gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[EDITOR_CLOSED]); + } } /* Menu callbacks */ -- cgit v1.2.3