summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2016-02-11 13:09:34 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2016-02-11 13:09:34 (GMT)
commit9dfb98372e170ddfced9a18c4570c60cbcda0139 (patch)
tree27e2346af3e48258f7aafc2157f2b33291ebf0ec
parent195893d4a8ffd4ff72845ef038d89ab7efb28835 (diff)
downloadtk-9dfb98372e170ddfced9a18c4570c60cbcda0139.zip
tk-9dfb98372e170ddfced9a18c4570c60cbcda0139.tar.gz
tk-9dfb98372e170ddfced9a18c4570c60cbcda0139.tar.bz2
Fix crash in TkFinalize() if Tk_Init() is never called. Suggested by Brian Griffin.
FossilOrigin-Name: ab7f10ab98b44ec79c22931b6e31e95786fa4165
-rw-r--r--generic/tkEvent.c6
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);