summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorredman <redman>1999-07-01 00:39:38 (GMT)
committerredman <redman>1999-07-01 00:39:38 (GMT)
commitb25a3044a3cf9e9972515d62b1210ab9f48542de (patch)
treed6929409d78b4fb5eb9279cff651a5b7217fb203 /win
parentdc805df6643379e019ae55d9932aea6a3d58c05c (diff)
downloadtk-b25a3044a3cf9e9972515d62b1210ab9f48542de.zip
tk-b25a3044a3cf9e9972515d62b1210ab9f48542de.tar.gz
tk-b25a3044a3cf9e9972515d62b1210ab9f48542de.tar.bz2
Patches from Bug: 2068 2080 2269
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c17
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) {