Fix recycled pointer for info.RemoteInfo

This commit is contained in:
2024-01-17 14:10:26 -05:00
parent c36607c62d
commit 1c373ff00f
4 changed files with 19 additions and 15 deletions

View File

@ -50,7 +50,9 @@ func (c *Cache) AliasesByProjectString(remotes ...string) string {
w.Init(&str, 10, 0, 0, ' ', tabwriter.AlignRight)
for _, p := range c.GetProjectsWithAliases() {
if !slices.Contains(remotes, p.Remote) {
if p == nil {
continue
} else if len(remotes) > 0 && !slices.Contains(remotes, p.Remote) {
continue
}
var pa string