mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 16:49:43 +00:00
Add nil pointer check when accessing config provider
This commit is contained in:
@@ -48,7 +48,7 @@ func (c *Conf) ReposRoot() string {
|
||||
return reposRoot
|
||||
}
|
||||
|
||||
if c.gitconfig == nil {
|
||||
if c == nil || c.gitconfig == nil {
|
||||
return defReposRoot
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func (c *Conf) DefaultHost() string {
|
||||
return defaultHost
|
||||
}
|
||||
|
||||
if c.gitconfig == nil {
|
||||
if c == nil || c.gitconfig == nil {
|
||||
return DefaultHost
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user