summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/conn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conn.c b/src/conn.c
index 39833c8..1b21d17 100644
--- a/src/conn.c
+++ b/src/conn.c
@@ -319,7 +319,7 @@ xpybConn_call(xpybConn *self, PyObject *args, PyObject *kw)
/* Check our dictionary of cached values */
ext = xpybConn_load_ext(self, key);
- if (!ext->present) {
+ if (ext != NULL && !ext->present) {
PyErr_SetString(xpybExcept_ext, "Extension not present on server.");
Py_DECREF(ext);
return NULL;