Check nil signature
This commit is contained in:
parent
13ca96065e
commit
91d08450b6
|
@ -17,6 +17,10 @@ type Signature struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSignatureFromC(sig *C.git_signature) *Signature {
|
func newSignatureFromC(sig *C.git_signature) *Signature {
|
||||||
|
if sig == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// git stores minutes, go wants seconds
|
// git stores minutes, go wants seconds
|
||||||
loc := time.FixedZone("", int(sig.when.offset)*60)
|
loc := time.FixedZone("", int(sig.when.offset)*60)
|
||||||
return &Signature{
|
return &Signature{
|
||||||
|
|
Loading…
Reference in New Issue