diff tk8.6.17/win/Makefile.in tk8.6.17-no-segfault/win/Makefile.in
index 3d89da5..980041b 100644
--- tk8.6.17/win/Makefile.in
+++ tk8.6.17-no-segfault/win/Makefile.in
@@ -723,6 +723,9 @@ tkUnixScale.$(OBJEXT): ${UNIX_DIR}/tkUnixScale.c
 tkWindow.$(OBJEXT): ${GENERIC_DIR}/tkWindow.c configure Makefile tkUuid.h
 	$(CC) -c $(CC_SWITCHES) -I. -DBUILD_tk @DEPARG@ $(CC_OBJNAME)
 
+# Prevent a segmentation fault after TkFinalize() was called (twice)
+tkWin32Dll.$(OBJEXT): CFLAGS += -O1
+
 # Extra dependency info
 tkConsole.$(OBJEXT): configure Makefile
 tkMain.$(OBJEXT): configure Makefile
