summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitk4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitk b/gitk
index 080192820e..fc502fbd68 100755
--- a/gitk
+++ b/gitk
@@ -10332,7 +10332,9 @@ proc refill_reflist {} {
if {![string match "remotes/*" $n] && [string match $reflistfilter $n]} {
if {[commitinview $headids($n) $curview]} {
lappend localrefs [list $n H]
- if {[info exists upstreamofref($n)] && [commitinview $headids($upstreamofref($n)) $curview]} {
+ if {[info exists upstreamofref($n)] && \
+ [info exists headids($upstreamofref($n))] && \
+ [commitinview $headids($upstreamofref($n)) $curview]} {
lappend trackedremoterefs [list $upstreamofref($n) R]
}
} else {