summaryrefslogtreecommitdiffstats
path: root/generic/tkBitmap.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2006-02-27 11:36:02 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2006-02-27 11:36:02 (GMT)
commit6cb33e44a81ba0046c3a57b84a0a3c8cef74eb8c (patch)
tree19981e8e952d86d063104857c4f4fc757ce3fecd /generic/tkBitmap.c
parent886ad38fa70573eaff976f6bc6e62feecfce70d2 (diff)
downloadtk-6cb33e44a81ba0046c3a57b84a0a3c8cef74eb8c.zip
tk-6cb33e44a81ba0046c3a57b84a0a3c8cef74eb8c.tar.gz
tk-6cb33e44a81ba0046c3a57b84a0a3c8cef74eb8c.tar.bz2
Fix old thread-safety issue. [Bug 470322]
Diffstat (limited to 'generic/tkBitmap.c')
-rw-r--r--generic/tkBitmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index 3f9e2e6..c97d5c2 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.10 2002/08/05 04:30:38 dgp Exp $
+ * RCS: @(#) $Id: tkBitmap.c,v 1.10.2.1 2006/02/27 11:36:02 dkf Exp $
*/
#include "tkPort.h"
@@ -818,8 +818,12 @@ Tk_GetBitmapFromData(interp, tkwin, source, width, height)
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;