diff options
author | Alex Plotnick <shrike@netaxs.com> | 2012-02-29 11:59:52 -0500 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2012-03-08 18:34:24 +0100 |
commit | 7ce51a20d9c95c982163ae340a4dff99dc5f05a6 (patch) | |
tree | ed337d65cb41924e2f3f6be5236d56e265a633dd | |
parent | 719555e141f3b9c2f420ecc9bec88471ea5a410e (diff) |
Ensure that there's still a valid connection to the X server before attempting to send a request.
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r-- | src/ext.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -113,6 +113,10 @@ xpybExt_send_request(xpybExt *self, PyObject *args, PyObject *kw) return NULL; } + /* Check the connection */ + if (xpybConn_invalid(self->conn)) + return NULL; + /* Set up request structure */ xcb_req.count = 2; xcb_req.ext = (self->key != (xpybExtkey *)Py_None) ? &self->key->key : 0; |