diff options
author | Eamon Walsh <efw@eamonwalsh.com> | 2010-08-02 19:42:57 -0400 |
---|---|---|
committer | Eamon Walsh <efw@eamonwalsh.com> | 2010-08-02 19:46:38 -0400 |
commit | d4406532543bcdb936b20ffcb03993d7a7207ace (patch) | |
tree | 3daf5848f3df85d2b20efddcb4f8161e94f5fade | |
parent | e47554707d883a945eac7d362c2ce27cac5d0929 (diff) |
Fix previous commit.
First argument to xcb_discard_reply() is an xcb_connection_t,
and it can be NULL in the event of a disconnect.
Signed-off-by: Eamon Walsh <efw@eamonwalsh.com>
-rw-r--r-- | src/cookie.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cookie.c b/src/cookie.c index 46bf645..9994e51 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -23,7 +23,9 @@ xpybCookie_new(PyTypeObject *self, PyObject *args, PyObject *kw) static void xpybCookie_dealloc(xpybCookie *self) { - xcb_discard_reply(self, self->cookie.sequence); + if (self->conn->conn) + xcb_discard_reply(self->conn->conn, self->cookie.sequence); + Py_CLEAR(self->reply_type); Py_CLEAR(self->request); Py_CLEAR(self->conn); |