diff options
author | Alex Plotnick <shrike@netaxs.com> | 2012-02-29 11:59:53 -0500 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2012-03-08 16:24:49 +0100 |
commit | 20c697b2741d63e61e8cbf8c6bb89332b24bb218 (patch) | |
tree | 6076662db417bb2327d7eb1eb9219a5ca0018f3c | |
parent | 9206f73599512f2243c19ab21856863b246d867b (diff) |
Don't blindly access the connection object in xpybCookie_dealloc; it may be NULL.
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r-- | src/cookie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cookie.c b/src/cookie.c index 9994e51..3a9f70b 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -23,7 +23,7 @@ xpybCookie_new(PyTypeObject *self, PyObject *args, PyObject *kw) static void xpybCookie_dealloc(xpybCookie *self) { - if (self->conn->conn) + if (self->conn && self->conn->conn) xcb_discard_reply(self->conn->conn, self->cookie.sequence); Py_CLEAR(self->reply_type); |