diff --git a/kitty/history.c b/kitty/history.c index c46f9bbda..4ee6095ec 100644 --- a/kitty/history.c +++ b/kitty/history.c @@ -33,7 +33,7 @@ new(PyTypeObject *type, PyObject *args, PyObject UNUSED *kwds) { self->buf = PyMem_Calloc(xnum * ynum, sizeof(Cell)); self->continued_map = PyMem_Calloc(ynum, sizeof(bool)); self->line = alloc_line(); - if (self->buf == NULL || self->line == NULL || self->continued_map) { + if (self->buf == NULL || self->line == NULL || self->continued_map == NULL) { PyErr_NoMemory(); PyMem_Free(self->buf); Py_CLEAR(self->line); PyMem_Free(self->continued_map); Py_CLEAR(self);