diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 71b78ca..ca2b834 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.8 1999/04/16 01:51:54 stanton Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.9 1999/07/01 00:39:48 redman Exp $ */ #include "tkWinInt.h" @@ -518,7 +518,20 @@ void TkWinWmCleanup(hInstance) HINSTANCE hInstance; { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr; + + /* + * If we're using stubs to access the Tcl library, and they + * haven't been initialized, we can't call Tcl_GetThreadData. + */ + +#ifdef USE_TCL_STUBS + if (tclStubsPtr == NULL) { + return; + } +#endif + + tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!tsdPtr->initialized) { |