forked from aniani/vim
patch 8.2.4126: crash on exit when built with dynamic Tcl
Problem: Crash on exit when built with dynamic Tcl and EXITFREE is defined. (Dominique Pellé) Solution: Only call Tcl_Finalize() when initialized. (closes #9546)
This commit is contained in:
19
src/if_tcl.c
19
src/if_tcl.c
@@ -248,14 +248,6 @@ vim_tcl_init(char *arg)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(EXITFREE) || defined(PROTO)
|
|
||||||
void
|
|
||||||
vim_tcl_finalize(void)
|
|
||||||
{
|
|
||||||
Tcl_Finalize();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(DYNAMIC_TCL) || defined(PROTO)
|
#if defined(DYNAMIC_TCL) || defined(PROTO)
|
||||||
|
|
||||||
static int stubs_initialized = FALSE;
|
static int stubs_initialized = FALSE;
|
||||||
@@ -285,6 +277,17 @@ tcl_enabled(int verbose)
|
|||||||
}
|
}
|
||||||
return stubs_initialized;
|
return stubs_initialized;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(EXITFREE) || defined(PROTO)
|
||||||
|
void
|
||||||
|
vim_tcl_finalize(void)
|
||||||
|
{
|
||||||
|
# ifdef DYNAMIC_TCL
|
||||||
|
if (stubs_initialized)
|
||||||
|
# endif
|
||||||
|
Tcl_Finalize();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4126,
|
||||||
/**/
|
/**/
|
||||||
4125,
|
4125,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user