diff options
-rwxr-xr-x | tkread | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |