summaryrefslogtreecommitdiff
path: root/gui/gdmcommon.c
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-07-31 17:28:20 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-07-31 17:28:20 +0000
commit84ed8ee1e59df7bdcf41b9ca8b950632e2a33e8f (patch)
tree089bf0b5e93cbfff654e2f8101e0e41a176ee43c /gui/gdmcommon.c
parent14bd2967d76b7af93ab1b173f8e7b80d83dbcd9c (diff)
downloadgdm-84ed8ee1e59df7bdcf41b9ca8b950632e2a33e8f.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.
Diffstat (limited to 'gui/gdmcommon.c')
-rw-r--r--gui/gdmcommon.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/gui/gdmcommon.c b/gui/gdmcommon.c
index 88037c8f..f50f41a9 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);
}