diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2008-09-01 12:00:00 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2008-09-01 12:00:00 +0800 |
commit | 07f20eb8fb34789ca0ff9d418545f87bec443b85 (patch) | |
tree | 3755855d1459b7cc8329f8593b38a611393e255a /addressbook/gui | |
parent | b352ba9c53b6e279305d9cb94c18c28461324da3 (diff) | |
download | gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar.gz gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar.bz2 gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar.lz gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar.xz gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.tar.zst gsoc2013-evolution-07f20eb8fb34789ca0ff9d418545f87bec443b85.zip |
Milan Crha <mcrha@redhat.com> ** Part of fix for bug #548827 (Check bounds of the string array before accessing elements, show more detailed error message if available).
svn path=/trunk/; revision=36237
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index ecae7ed8c3..142ed3550f 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1731,7 +1731,7 @@ static void delete_contacts_cb (EBook *book, EBookStatus status, gpointer clos break; default : /* Unknown error */ - e_error_run (NULL, "addressbook:generic-error", _("Failed to delete contact"), _("Other error"), NULL); + eab_error_dialog (_("Failed to delete contact"), status); break; } } diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 5f21e4da29..ba236da919 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -82,7 +82,12 @@ static const char *status_to_string[] = { void eab_error_dialog (const char *msg, EBookStatus status) { - const char *status_str = status_to_string [status]; + const char *status_str; + + if (status < 0 || status >= G_N_ELEMENTS (status_to_string)) + status_str = "Other error"; + else + status_str = status_to_string [status]; if (status_str) e_error_run (NULL, "addressbook:generic-error", msg, _(status_str), NULL); |