aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-17 20:10:40 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-17 20:10:40 +0800
commitf12ec068f993121f8dc8a3170591d21be6a2a665 (patch)
treeb6f2c476b1a5c237209d1051a6cb895fc5eb875e /shell
parentb30295b408b5a6cd7c7760cf13d6c50186c7fb48 (diff)
downloadgsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar.gz
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar.bz2
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar.lz
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar.xz
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.tar.zst
gsoc2013-evolution-f12ec068f993121f8dc8a3170591d21be6a2a665.zip
Do not crash in create_default_shell()
Diffstat (limited to 'shell')
-rw-r--r--shell/main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/main.c b/shell/main.c
index c7172bea28..d71e499dba 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -421,10 +421,14 @@ create_default_shell (void)
NULL);
/* Failure to register is fatal. */
- if (error != NULL)
- g_error ("%s", error->message);
+ if (error != NULL) {
+ e_notice (NULL, GTK_MESSAGE_ERROR,
+ _("Cannot start Evolution, other instance is probably running and is unresponsive. System error: %s"),
+ error->message);
+ g_clear_error (&error);
+ }
- if (force_online)
+ if (force_online && shell)
e_shell_lock_network_available (shell);
g_object_unref (settings);
@@ -657,6 +661,8 @@ main (gint argc,
e_ensure_type (WEBKIT_TYPE_WEB_VIEW);
shell = create_default_shell ();
+ if (!shell)
+ return 1;
if (quit) {
e_shell_quit (shell, E_SHELL_QUIT_OPTION);