diff options
author | John Cai <jcai@gitlab.com> | 2019-04-10 03:31:20 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2019-04-10 21:39:36 +0300 |
commit | 674b926ef4dd48146be7fa8a8c37861b285bbe3b (patch) | |
tree | 0a51b6c99e31091adb8af5add50ce2643652f20e /lib/gitlab/git | |
parent | 9d7ff90d9a7bd9dbe9184c9588510f247877274f (diff) |
Guard against nil dereferenced_target
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index c33d243330d..a22e3c4b9dd 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -466,7 +466,7 @@ module Gitlab @refs_hash = Hash.new { |h, k| h[k] = [] } (tags + branches).each do |ref| - next unless ref.target && ref.name + next unless ref.target && ref.name && ref.dereferenced_target&.id @refs_hash[ref.dereferenced_target.id] << ref.name end |