File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1212#include "tkWinInt.h"
1313#ifndef STATIC_BUILD
1414
15- #if defined(HAVE_NO_SEH ) && !defined(__aarch64__ )
15+ #if defined(HAVE_NO_SEH ) && !defined(__aarch64__ ) && defined( NDEBUG )
1616
1717/*
1818 * Unlike Borland and Microsoft, we don't register exception handlers by
@@ -101,7 +101,7 @@ DllMain(
101101 DWORD reason ,
102102 LPVOID reserved )
103103{
104- #if defined(HAVE_NO_SEH ) && !defined(__aarch64__ )
104+ #if defined(HAVE_NO_SEH ) && !defined(__aarch64__ ) && defined( NDEBUG )
105105 TCLEXCEPTION_REGISTRATION registration ;
106106#endif
107107 (void )reserved ;
@@ -123,9 +123,9 @@ DllMain(
123123 * guaranteed Tk is always being unloaded from a stable condition.
124124 */
125125
126- #ifdef HAVE_NO_SEH
127- # if defined(__aarch64__ )
128- /* Don't run TkFinalize(NULL) on mingw-w64 for ARM64, since we don't have corresponding assembler-code. */
126+ #if defined( HAVE_NO_SEH ) || defined( __aarch64__ ) || !defined( NDEBUG )
127+ # if defined(__aarch64__ ) || !defined( NDEBUG )
128+ TkFinalize (NULL );
129129# elif defined(_WIN64 )
130130 __asm__ __volatile__ (
131131
You can’t perform that action at this time.
0 commit comments