[at-spi2-core] Add a NULL check into atspi_event_listener_register_from_callback
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Add a NULL check into atspi_event_listener_register_from_callback
- Date: Fri, 28 Jan 2011 14:26:16 +0000 (UTC)
commit d08bc3d2a0d4c56cb14c782962012e2f06c7ec34
Author: Mike Gorse <mgorse novell com>
Date: Fri Jan 28 08:28:19 2011 -0600
Add a NULL check into atspi_event_listener_register_from_callback
atspi/atspi-event-listener.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 0083c61..e931ba1 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -504,6 +504,12 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
return FALSE;
}
+ if (!event_type)
+ {
+ g_warning (_("called atspi_event_listener_register_from_callback with a NULL event_type"));
+ return FALSE;
+ }
+
e = g_new (EventListenerEntry, 1);
if (!e) return FALSE;
e->callback = callback;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]