diff --git a/src/if_py_both.h b/src/if_py_both.h index aa2591267d..cbfbaa7673 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -77,6 +77,11 @@ OutputWrite(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len)) return NULL; + /* TODO: This works around a gcc optimizer problem and avoids Vim + * from crashing. Should find a real solution. */ + if (str == NULL) + return NULL; + Py_BEGIN_ALLOW_THREADS Python_Lock_Vim(); writer((writefn)(error ? emsg : msg), (char_u *)str, len); diff --git a/src/version.c b/src/version.c index c0d60e8aad..b2f26a9ba4 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 497, /**/ 496, /**/