diff options
author | jenglish <jenglish@noemail.net> | 2005-11-20 18:23:02 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2005-11-20 18:23:02 (GMT) |
commit | 677e2a7e44b30de000a5a2738b988e521077c567 (patch) | |
tree | 2c179183e9ca0ccf1e987a71acad3e182f231b96 /generic/tclStubLib.c | |
parent | 63fb175acdbd164e7ae947c3cf6b3a017dcb3f1c (diff) | |
download | tcl-677e2a7e44b30de000a5a2738b988e521077c567.zip tcl-677e2a7e44b30de000a5a2738b988e521077c567.tar.gz tcl-677e2a7e44b30de000a5a2738b988e521077c567.tar.bz2 |
Don't set tclStubsPtr to 0 when Tcl_PkgRequireEx() fails
[Fix for #1091431 "Tcl_InitStubs failure crashes wish"]
FossilOrigin-Name: e9675e462c170b4e7c9e2b4ab4da420cd2bf04a3
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r-- | generic/tclStubLib.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index c650dac..466a003 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.6 2002/12/04 07:07:59 hobbs Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.6.2.1 2005/11/20 18:23:03 jenglish Exp $ */ /* @@ -33,9 +33,6 @@ * functions should be built as non-exported symbols. */ -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT - TclStubs *tclStubsPtr = NULL; TclPlatStubs *tclPlatStubsPtr = NULL; TclIntStubs *tclIntStubsPtr = NULL; @@ -87,7 +84,7 @@ Tcl_InitStubs (interp, version, exact) int exact; { CONST char *actualVersion = NULL; - TclStubs *tmp; + ClientData pkgData = NULL; /* * We can't optimize this check by caching tclStubsPtr because @@ -100,12 +97,11 @@ Tcl_InitStubs (interp, version, exact) return NULL; } - actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact, - (ClientData *) &tmp); + actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact, &pkgData); if (actualVersion == NULL) { - tclStubsPtr = NULL; return NULL; } + tclStubsPtr = (TclStubs*)pkgData; if (tclStubsPtr->hooks) { tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs; |