diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2009-05-16 02:08:46 +0700 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2009-05-15 15:14:43 -0400 |
commit | 16db1b6c77aa75dbcad609a30e25199c6c15a91a (patch) | |
tree | 33cd902bd7aa7628cfc78ce0cc32d671720f2e4e | |
parent | 6c58f2df7eebeac73ec0d9e33d0f2887f28f659d (diff) |
Zero out handlers list in xcb_event_handlers_init
xcb_event_handle relies on the fact that handler for non-handled
event is NULL. Initialize handlers in xcb_event_handlers_init
to avoid calling function by uninitialized pointer.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Peter Harris <pharris@opentext.com>
-rw-r--r-- | event/event.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/event/event.c b/event/event.c index ce83d6e..1332a33 100644 --- a/event/event.c +++ b/event/event.c @@ -35,6 +35,7 @@ void xcb_event_handlers_init(xcb_connection_t *c, xcb_event_handlers_t *evenths) { + memset(evenths, 0, sizeof(xcb_event_handlers_t)); evenths->c = c; } |