diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-02-11 13:09:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-02-11 13:09:34 (GMT) |
commit | 4dd26486a8997a2706c8c9369c4a17706c33e114 (patch) | |
tree | 27e2346af3e48258f7aafc2157f2b33291ebf0ec | |
parent | 8f151700b10bf8811876305e284738707d4ad237 (diff) | |
download | tk-4dd26486a8997a2706c8c9369c4a17706c33e114.zip tk-4dd26486a8997a2706c8c9369c4a17706c33e114.tar.gz tk-4dd26486a8997a2706c8c9369c4a17706c33e114.tar.bz2 |
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 bcc6d98..95aeda1 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -2039,6 +2039,12 @@ TkFinalize( { ExitHandler *exitPtr; +#if defined(_WIN32) && !defined(STATIC_BUILD) + if (!tclStubsPtr) { + return; + } +#endif + Tcl_DeleteExitHandler(TkFinalize, NULL); Tcl_MutexLock(&exitMutex); |