diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2006-02-27 11:34:49 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2006-02-27 11:34:49 (GMT) |
commit | 3726a61e9a2fae065f84a4bc00a19db96134e593 (patch) | |
tree | 7f11f3bfc0e37739657f7679783ef9d6c988e025 /generic/tkBitmap.c | |
parent | 21ff70fe4013b0eaafba5346a5b6bd277943b488 (diff) | |
download | tk-3726a61e9a2fae065f84a4bc00a19db96134e593.zip tk-3726a61e9a2fae065f84a4bc00a19db96134e593.tar.gz tk-3726a61e9a2fae065f84a4bc00a19db96134e593.tar.bz2 |
Fix old thread-safety issue. [Bug 470322]
Diffstat (limited to 'generic/tkBitmap.c')
-rw-r--r-- | generic/tkBitmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 612e92a..c4900bc 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.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: tkBitmap.c,v 1.14 2005/11/17 10:57:35 dkf Exp $ + * RCS: @(#) $Id: tkBitmap.c,v 1.15 2006/02/27 11:34:49 dkf Exp $ */ #include "tkPort.h" @@ -809,8 +809,12 @@ Tk_GetBitmapFromData( char string[16 + TCL_INTEGER_SPACE]; char *name; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - BitmapInit(dispPtr); + if (!tsdPtr->initialized) { + BitmapInit(dispPtr); + } nameKey.source = source; nameKey.width = width; |