From a5792f58905da28f0ab37e1c4c3cfd8171b2e602 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Nov 2005 21:25:05 +0000 Subject: updated for version 7.0158 --- src/if_python.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/if_python.c') 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 -- cgit v1.2.1