diff options
author | Ray Strode <rstrode@redhat.com> | 2010-03-18 08:59:45 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2010-06-10 18:50:30 -0400 |
commit | 8a787d1fb1bfbcc076605cc97566ef06b0f663f0 (patch) | |
tree | 855f512df14eb2b9c5f55ecfcb2e1ecc79228394 | |
parent | f3831d46bbf0a578ee0b9f8845c9de747afbe6e8 (diff) | |
download | gdm-8a787d1fb1bfbcc076605cc97566ef06b0f663f0.tar.gz |
Don't crash when adding multiple user switchers
Before we were blowing an assertion because settings client was
getting initialized twice.
https://bugzilla.gnome.org/show_bug.cgi?id=610179
-rw-r--r-- | gui/user-switch-applet/applet.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c index 411a1294..8b419f27 100644 --- a/gui/user-switch-applet/applet.c +++ b/gui/user-switch-applet/applet.c @@ -1410,17 +1410,18 @@ fill_applet (PanelApplet *applet) "widget \"*.gdm-user-switch-applet\" style \"gdm-user-switch-applet-style\"\n"); gtk_window_set_default_icon_name ("stock_people"); g_set_application_name (_("User Switch Applet")); + + if (! gdm_settings_client_init (GDMCONFDIR "/gdm.schemas", "/")) { + g_critical ("Unable to initialize settings client"); + exit (1); + } + } adata = g_new0 (GdmAppletData, 1); adata->applet = applet; adata->panel_size = 24; - if (! gdm_settings_client_init (GDMCONFDIR "/gdm.schemas", "/")) { - g_critical ("Unable to initialize settings client"); - exit (1); - } - adata->client = gconf_client_get_default (); gtk_widget_set_tooltip_text (GTK_WIDGET (applet), _("Change account settings and status")); |