diff options
author | Brian Rogers <brian@xyzw.org> | 2009-01-31 10:37:51 -0800 |
---|---|---|
committer | Bart Massey <bart@cs.pdx.edu> | 2009-01-31 13:36:45 -0800 |
commit | ffd0300fb74c6183208ae599133f2ded09e08d97 (patch) | |
tree | 5ba0b7d40eef7bce1f6e7fc459cd85f9d6a9e9e3 | |
parent | 97fc6babd4ccaf300e25708868aa2a738893dc30 (diff) |
Initialize event_notify after allocating the memory for it.
An uninitialized or otherwise invalid condition variable can apparently
cause a hang in pthread_cond_broadcast. Ekiga, openoffice, and xine
at least are freezing as a result of event_notify never being initialized.
Signed-off-by: Brian Rogers <brian@xyzw.org>
Signed-off-by: Bart Massey <bart@cs.pdx.edu>
-rw-r--r-- | src/xcb_disp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xcb_disp.c b/src/xcb_disp.c index d9760646..584380c8 100644 --- a/src/xcb_disp.c +++ b/src/xcb_disp.c @@ -94,6 +94,9 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr dpy->xcb->next_xid = xcb_generate_id(dpy->xcb->connection); dpy->xcb->event_notify = xcondition_malloc(); + if (!dpy->xcb->event_notify) + return 0; + xcondition_init(dpy->xcb->event_notify); return !xcb_connection_has_error(c); } |