diff --git a/src/python/recoll/pyrecoll.cpp b/src/python/recoll/pyrecoll.cpp index 56466d22..a5849bc9 100644 --- a/src/python/recoll/pyrecoll.cpp +++ b/src/python/recoll/pyrecoll.cpp @@ -614,6 +614,11 @@ Doc_setattr(recoll_DocObject *self, char *name, PyObject *value) PyErr_SetString(PyExc_AttributeError, "doc??"); return -1; } + if (!rclconfig || !rclconfig->ok()) { + PyErr_SetString(PyExc_EnvironmentError, + "Configuration not initialized"); + return -1; + } #if PY_MAJOR_VERSION < 3 if (PyString_Check(value)) {