diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-04-25 21:37:17 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-04-25 21:37:17 (GMT) |
commit | fee601196f3a3d37e48ca7a5ea763cd132e49cd6 (patch) | |
tree | 132b0442d0fa8a33d0b625e1de318963e109bb78 /generic/tclUtil.c | |
parent | 6cf83d45073c586faca9948b305311770bcc49ca (diff) | |
download | tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.zip tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.tar.gz tcl-fee601196f3a3d37e48ca7a5ea763cd132e49cd6.tar.bz2 |
Merged with HEAD.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 6708699..0d538e0 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.51.2.9 2005/04/10 23:14:57 kennykb Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.51.2.10 2005/04/25 21:37:22 kennykb Exp $ */ #include "tclInt.h" @@ -2851,14 +2851,14 @@ TclGetProcessGlobalValue(pgvPtr) /* If no thread has set the shared value, call the initializer */ Tcl_MutexLock(&pgvPtr->mutex); - if (NULL == pgvPtr->value) { - if (pgvPtr->proc) { - pgvPtr->epoch++; - (*(pgvPtr->proc))(&pgvPtr->value, &pgvPtr->numBytes, - &pgvPtr->encoding); - Tcl_CreateExitHandler(FreeProcessGlobalValue, - (ClientData) pgvPtr); + if ((NULL == pgvPtr->value) && (pgvPtr->proc)) { + pgvPtr->epoch++; + (*(pgvPtr->proc))(&pgvPtr->value, &pgvPtr->numBytes, + &pgvPtr->encoding); + if (pgvPtr->value == NULL) { + Tcl_Panic("PGV Initializer did not initialize."); } + Tcl_CreateExitHandler(FreeProcessGlobalValue, (ClientData) pgvPtr); } /* Store a copy of the shared value in our epoch-indexed cache */ |