summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/repo/mirror.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/repo/mirror.go b/models/repo/mirror.go
index 8f96e8cee1..e94bbda2c1 100644
--- a/models/repo/mirror.go
+++ b/models/repo/mirror.go
@@ -153,7 +153,9 @@ func (repos MirrorRepositoryList) loadAttributes(ctx context.Context) error {
}
for i := range repos {
repos[i].Mirror = set[repos[i].ID]
- repos[i].Mirror.Repo = repos[i]
+ if repos[i].Mirror != nil {
+ repos[i].Mirror.Repo = repos[i]
+ }
}
return nil
}