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/gui/contact-editor/e-contact-editor.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'addressbook/gui/contact-editor/e-contact-editor.c') 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