diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-02-11 13:11:28 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-02-11 13:11:28 (GMT) |
commit | 03e15875540e77c1ee40fbeb63955bb50eade596 (patch) | |
tree | 2f71efb515e3b4b66bd75db15029e833c0a3a330 | |
parent | 815d4d45ee5bc0d0f1bc242e303f39491f356cb6 (diff) | |
download | tk-03e15875540e77c1ee40fbeb63955bb50eade596.zip tk-03e15875540e77c1ee40fbeb63955bb50eade596.tar.gz tk-03e15875540e77c1ee40fbeb63955bb50eade596.tar.bz2 |
(cherry-pick): Fix crash in TkFinalize() if Tk_Init() is never called. Suggested by Brian Griffin.
-rw-r--r-- | generic/tkEvent.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 03e7283..747555e 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -2047,6 +2047,12 @@ TkFinalize( { ExitHandler *exitPtr; +#if defined(_WIN32) && !defined(STATIC_BUILD) + if (!tclStubsPtr) { + return; + } +#endif + Tcl_DeleteExitHandler(TkFinalize, NULL); Tcl_MutexLock(&exitMutex); |