From 8ab7f1a02444f3484284092ec1a6b8066781b8e2 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 12 Nov 2001 17:31:56 +0000 Subject: If our call to e_categories_new returns NULL, put up an error dialog and 2001-11-12 Jon Trowbridge * gui/contact-editor/e-contact-editor.c (categories_clicked): If our call to e_categories_new returns NULL, put up an error dialog and return. (Fixed #14780) svn path=/trunk/; revision=14672 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/contact-editor/e-contact-editor.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 935ce550ac..18802fdb07 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-11-12 Jon Trowbridge + + * gui/contact-editor/e-contact-editor.c (categories_clicked): If + our call to e_categories_new returns NULL, put up an error dialog + and return. (Fixed #14780) + 2001-11-09 Chris Toshok [ Fixes Ximian bug #14687 ] diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2983cd8a24..5abc4af8f7 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -750,6 +751,13 @@ categories_clicked(GtkWidget *button, EContactEditor *editor) "categories", &categories, NULL); dialog = GNOME_DIALOG(e_categories_new(categories)); + + if (dialog == NULL) { + GtkWidget *uh_oh = gnome_error_dialog (_("Category editor not available.")); + gtk_widget_show (uh_oh); + return; + } + ecml = e_categories_master_list_wombat_new (); gtk_object_set(GTK_OBJECT(dialog), "header", _("This contact belongs to these categories:"), -- cgit