Mercurial > vim
diff src/if_python.c @ 557:862863033fdd v7.0158
updated for version 7.0158
author | vimboss |
---|---|
date | Wed, 23 Nov 2005 21:25:05 +0000 |
parents | 52e76e2b5b65 |
children | 1c586ee8dd45 |
line wrap: on
line diff
--- a/src/if_python.c +++ b/src/if_python.c @@ -436,6 +436,14 @@ static void Python_Release_Vim(void) void python_end() { + static int recurse = 0; + + /* If a crash occurs while doing this, don't try again. */ + if (recurse != 0) + return; + + ++recurse; + #ifdef DYNAMIC_PYTHON if (hinstPython && Py_IsInitialized()) { @@ -450,6 +458,8 @@ python_end() Py_Finalize(); } #endif + + --recurse; } static int