diff options
author | Brian Cameron <brian.cameron@sun.com> | 2006-07-31 17:30:59 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2006-07-31 17:30:59 +0000 |
commit | 6b9277fd58e056b88a2a2ed88e43c8971740a118 (patch) | |
tree | 4f1ed4909e8412a746dbdcdd60c2ce22a3961297 | |
parent | 43d4a34c00028fdc68721a0c57ea8cb1e1192a74 (diff) | |
download | gdm-6b9277fd58e056b88a2a2ed88e43c8971740a118.tar.gz |
Fix gdm_common_setup_blinking so it doesn't try to call
2006-07-31 Brian Cameron <brian.cameron@sun.com>
* ui/gdmcommon.c: Fix gdm_common_setup_blinking so it doesn't
try to call g_signal_add_emission_hook if sid is 0. This fixes
a crash in gdmchooser because we were trying to set the
emission hook for a type that was not used or initialized in the
gdmchooser GUI. This fixes bug #349221.
* gui/gdmcommon.c: Set hosts_opt to NULL, otherwise processing of
hosts from the command line would not get done if the compiler
put a non-NULL value into its initial value, as it does on
Solaris.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | gui/gdmchooser.c | 2 | ||||
-rw-r--r-- | gui/gdmcommon.c | 36 |
3 files changed, 34 insertions, 16 deletions
@@ -1,3 +1,15 @@ +2006-07-31 Brian Cameron <brian.cameron@sun.com> + + * gui/gdmcommon.c: Fix gdm_common_setup_blinking so it doesn't + try to call g_signal_add_emission_hook if sid is 0. This fixes + a crash in gdmchooser because we were trying to set the + emission hook for a type that was not used or initialized in the + gdmchooser GUI. This fixes bug #349221. + * gui/gdmcommon.c: Set hosts_opt to NULL, otherwise processing of + hosts from the command line would not get done if the compiler + put a non-NULL value into its initial value, as it does on + Solaris. + 2006-07-18 Brian Cameron <brian.cameron@sun.com> * gui/gdmlogin.c, gui/gdmsession.[ch], gui/greeter/greeter.c, diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c index 01416e48..4b6bed14 100644 --- a/gui/gdmchooser.c +++ b/gui/gdmchooser.c @@ -1945,7 +1945,7 @@ int main (int argc, char *argv[]) { gchar *GdmHosts; - gchar **hosts_opt; + gchar **hosts_opt = NULL; poptContext ctx; int nextopt; const char *gdm_version; diff --git a/gui/gdmcommon.c b/gui/gdmcommon.c index ae204b67..5758f424 100644 --- a/gui/gdmcommon.c +++ b/gui/gdmcommon.c @@ -270,27 +270,33 @@ gdm_common_setup_blinking (void) sid = g_signal_lookup ("activate", GTK_TYPE_MENU_ITEM); - g_signal_add_emission_hook (sid, - 0 /* detail */, - delay_noblink, - NULL /* data */, - NULL /* destroy_notify */); + if (sid != NULL) { + g_signal_add_emission_hook (sid, + 0 /* detail */, + delay_noblink, + NULL /* data */, + NULL /* destroy_notify */); + } sid = g_signal_lookup ("key_press_event", GTK_TYPE_WIDGET); - g_signal_add_emission_hook (sid, - 0 /* detail */, - delay_noblink, - NULL /* data */, - NULL /* destroy_notify */); + if (sid != NULL) { + g_signal_add_emission_hook (sid, + 0 /* detail */, + delay_noblink, + NULL /* data */, + NULL /* destroy_notify */); + } sid = g_signal_lookup ("button_press_event", GTK_TYPE_WIDGET); - g_signal_add_emission_hook (sid, - 0 /* detail */, - delay_noblink, - NULL /* data */, - NULL /* destroy_notify */); + if (sid != NULL) { + g_signal_add_emission_hook (sid, + 0 /* detail */, + delay_noblink, + NULL /* data */, + NULL /* destroy_notify */); + } noblink_timeout = g_timeout_add (NOBLINK_TIMEOUT, no_blink, NULL); } |