summaryrefslogtreecommitdiff
path: root/src/if_python.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-11-23 21:25:05 +0000
committerBram Moolenaar <Bram@vim.org>2005-11-23 21:25:05 +0000
commita5792f58905da28f0ab37e1c4c3cfd8171b2e602 (patch)
tree258ddcfde89bbf98b90d42dd6c297e1b22a20d09 /src/if_python.c
parentaf289d333a2985051948a53d510fa345df1ddeb3 (diff)
downloadvim-git-a5792f58905da28f0ab37e1c4c3cfd8171b2e602.tar.gz
updated for version 7.0158v7.0158
Diffstat (limited to 'src/if_python.c')
-rw-r--r--src/if_python.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/if_python.c b/src/if_python.c
index 623731a55..d58f7cf1e 100644
--- 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