summaryrefslogtreecommitdiff
path: root/tkread
diff options
context:
space:
mode:
Diffstat (limited to 'tkread')
-rwxr-xr-xtkread3
1 files changed, 1 insertions, 2 deletions
diff --git a/tkread b/tkread
index 9b8cc6c..0991dcc 100755
--- a/tkread
+++ b/tkread
@@ -167,8 +167,7 @@ proc markup {widget} {
$widget delete [indexmovechar $altstart "- 2"] [indexmovechar $srcend "+ 1"]
set insertion [indexmovechar $altstart "- 2"]
set localfile [file tail $src]
- if [file exists $localfile] {
- set curimg [image create photo -file $localfile]
+ if { [file exists $localfile] && ! [catch { set curimg [image create photo -file $localfile] }] } {
set imgcache($curimg) [image create photo]
$imgcache($curimg) copy $curimg
set imgshrunk($curimg) 0