aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-07-25 03:47:56 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-07-25 03:47:56 +0800
commite10cb0ac03a487f75188db10278174874e679deb (patch)
tree234fe03235422c41ba218284d544ab474f842e34
parent3e8b02fb9363320a8fc70a80654c59602380a4a9 (diff)
downloadgsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar.gz
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar.bz2
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar.lz
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar.xz
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.tar.zst
gsoc2013-evolution-e10cb0ac03a487f75188db10278174874e679deb.zip
Check if evolution_shell_client_get_local_storage returns
2001-07-24 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names.c (e_select_names_hookup_shell_listener): Check if evolution_shell_client_get_local_storage returns CORBA_OBJECT_NIL, which it should never do. If it does, print a warning in a dialog and try to recover w/o crashing. (Bug #5193) svn path=/trunk/; revision=11350
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c12
2 files changed, 20 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 04ae3a90f1..50548e10db 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-24 Jon Trowbridge <trow@ximian.com>
+
+ * gui/component/select-names/e-select-names.c
+ (e_select_names_hookup_shell_listener): Check if
+ evolution_shell_client_get_local_storage returns CORBA_OBJECT_NIL,
+ which it should never do. If it does, print a warning in a dialog
+ and try to recover w/o crashing. (Bug #5193)
+
2001-07-24 Dan Winship <danw@ximian.com>
* backend/ebook/e-book-listener.c (e_book_listener_stop): Don't
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index 1004e510a5..9340bbce48 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -24,6 +24,8 @@
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-dialog.h>
+#include <libgnomeui/gnome-dialog-util.h>
#include <gal/e-table/e-table-simple.h>
#include <gal/widgets/e-font.h>
@@ -393,6 +395,16 @@ e_select_names_hookup_shell_listener (ESelectNames *e_select_names)
listener = evolution_storage_listener_corba_objref(e_select_names->listener);
+ /* This should really never happen, but a bug report (ximian #5193) came in w/ a backtrace suggesting that it did in
+ fact happen to someone, so the best we can do is try to avoid crashing in this case. */
+ if (storage == CORBA_OBJECT_NIL) {
+ GtkWidget *oh_shit;
+
+ oh_shit = gnome_error_dialog (_("Unable to get local storage. This should never happen."));
+ gtk_widget_show (oh_shit);
+ return;
+ }
+
gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "new_folder",
GTK_SIGNAL_FUNC(new_folder), e_select_names);
gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "update_folder",