summaryrefslogtreecommitdiffstats
path: root/library/tkfbox.tcl
diff options
context:
space:
mode:
authordrh <drh@sqlite.org>2001-07-19 20:15:55 (GMT)
committerdrh <drh@sqlite.org>2001-07-19 20:15:55 (GMT)
commitdd394d420642d423b677fd79d7fb06462aaf1207 (patch)
tree438b0933079cf032eb9ee0e87a8deb982be6215a /library/tkfbox.tcl
parentc7f37e9d0848caca401986cdbf53b64a271f40e6 (diff)
downloadtk-dd394d420642d423b677fd79d7fb06462aaf1207.zip
tk-dd394d420642d423b677fd79d7fb06462aaf1207.tar.gz
tk-dd394d420642d423b677fd79d7fb06462aaf1207.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/tkfbox.tcl')
-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 } {