[gtk+/gtk-2-24] gailbutton: Avoid a possible NULL dereference
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gailbutton: Avoid a possible NULL dereference
- Date: Fri, 13 Feb 2015 18:42:08 +0000 (UTC)
commit 5364ede826b2e5b96b8d22c18634a6ad2ebdce68
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Feb 13 13:40:46 2015 -0500
gailbutton: Avoid a possible NULL dereference
We were using widget->window before checking widget for being NULL.
Pointed out by Sami Farin,
https://bugzilla.redhat.com/show_bug.cgi?id=1140414
modules/other/gail/gailbutton.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c
index 7812679..a88e0df 100644
--- a/modules/other/gail/gailbutton.c
+++ b/modules/other/gail/gailbutton.c
@@ -495,12 +495,6 @@ idle_do_action (gpointer data)
gail_button = GAIL_BUTTON (data);
gail_button->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_button)->widget;
- tmp_event.button.type = GDK_BUTTON_RELEASE;
- tmp_event.button.window = widget->window;
- tmp_event.button.button = 1;
- tmp_event.button.send_event = TRUE;
- tmp_event.button.time = GDK_CURRENT_TIME;
- tmp_event.button.axes = NULL;
g_object_ref (gail_button);
@@ -511,7 +505,15 @@ idle_do_action (gpointer data)
return FALSE;
}
else
- gtk_widget_event (widget, &tmp_event);
+ {
+ tmp_event.button.type = GDK_BUTTON_RELEASE;
+ tmp_event.button.window = widget->window;
+ tmp_event.button.button = 1;
+ tmp_event.button.send_event = TRUE;
+ tmp_event.button.time = GDK_CURRENT_TIME;
+ tmp_event.button.axes = NULL;
+ gtk_widget_event (widget, &tmp_event);
+ }
button = GTK_BUTTON (widget);
while (!g_queue_is_empty (gail_button->action_queue))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]