6
0
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:
Grzegorz Dlugoszewski
2020-05-30 12:45:55 +02:00
parent 7e42b1e3e9
commit cef21acc9e

View File

@@ -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
}