gnome-terminal r3242 - branches/gnome-2-24/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r3242 - branches/gnome-2-24/src
- Date: Mon, 8 Dec 2008 00:19:25 +0000 (UTC)
Author: chpe
Date: Mon Dec 8 00:19:25 2008
New Revision: 3242
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3242&view=rev
Log:
Bug 561663 â gnome-terminal crashes when gconf isn't set up correctly
Abort early when GConf isn't set up correctly, e.g. because there's no
dbus session bus running.
Modified:
branches/gnome-2-24/src/terminal.c
Modified: branches/gnome-2-24/src/terminal.c
==============================================================================
--- branches/gnome-2-24/src/terminal.c (original)
+++ branches/gnome-2-24/src/terminal.c Mon Dec 8 00:19:25 2008
@@ -1134,6 +1134,9 @@
return event.xproperty.time;
}
+/* Evil hack alert: this is exported from libgconf-2 but not in a public header */
+extern gboolean gconf_ping_daemon (void);
+
int
main (int argc, char **argv)
{
@@ -1235,6 +1238,15 @@
g_strfreev (argv_copy);
argv_copy = NULL;
+ /* If the gconf daemon isn't available (e.g. because there's no dbus
+ * session bus running), we'd crash later on. Tell the user about it
+ * now, and exit. See bug #561663. */
+ if (!gconf_ping_daemon ())
+ {
+ g_printerr ("Failed to contact the GConf daemon; exiting.\n");
+ exit (1);
+ }
+
gtk_window_set_default_icon_name (GNOME_TERMINAL_ICON_NAME);
g_assert (parsing_results->post_execute_args == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]