summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordrh@sqlite.org <drh>2001-07-19 20:15:55 (GMT)
committerdrh@sqlite.org <drh>2001-07-19 20:15:55 (GMT)
commit33a8c03efb7b398ebb9110300a1282ae41cb4982 (patch)
tree438b0933079cf032eb9ee0e87a8deb982be6215a /library
parent5ec1789d0bb158b1fa3f23b544dee4d786275666 (diff)
downloadtk-33a8c03efb7b398ebb9110300a1282ae41cb4982.zip
tk-33a8c03efb7b398ebb9110300a1282ae41cb4982.tar.gz
tk-33a8c03efb7b398ebb9110300a1282ae41cb4982.tar.bz2
The new tk_chooseDirectory dialog box implementation was sometimes giving
an error like this: can't read "data(list)": no such element in array. The problem is a race condition. This patch should fix the problem.
Diffstat (limited to 'library')
-rw-r--r--library/tkfbox.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 245a11a..00af406 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.25 2001/03/30 06:02:20 hobbs Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.26 2001/07/19 20:15:55 drh Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -42,6 +42,7 @@ proc tkIconList {w args} {
proc tkIconList_Index {w i} {
upvar #0 $w data
upvar #0 $w:itemList itemList
+ if {![info exists data(list)]} {set data(list) {}}
switch -regexp -- $i {
"^-?[0-9]+$" {
if { $i < 0 } {