gitk: Fixed broken exception handling in diff
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index d7fea265f3e48a32c11c208749d59f86a8f5bdda..abb6542c5f3b39c9f86cf0cfd4d26860d3de2d75 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -6457,9 +6457,10 @@ proc diffcmd {ids flags} {
 proc gettreediffs {ids} {
     global treediff treepending
 
+    if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
+
     set treepending $ids
     set treediff {}
-    if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
     fconfigure $gdtf -blocking 0
     filerun $gdtf [list gettreediffline $gdtf $ids]
 }