diff options
| author | Suhaib Mujahid <[email protected]> | 2020-04-23 19:07:58 -0400 |
|---|---|---|
| committer | lhchavez <[email protected]> | 2020-04-23 16:26:35 -0700 |
| commit | 91d08450b68efc8ef5bd5bfee29e813ca5829229 (patch) | |
| tree | 455d535c23d8c0b30d93823304aa50bd220f47f3 /signature.go | |
| parent | 13ca96065e6be3292c931cc580bbc125962b394e (diff) | |
Check nil signature
Diffstat (limited to 'signature.go')
| -rw-r--r-- | signature.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/signature.go b/signature.go index 220fe57..dfd9718 100644 --- a/signature.go +++ b/signature.go @@ -17,6 +17,10 @@ type Signature struct { } func newSignatureFromC(sig *C.git_signature) *Signature { + if sig == nil { + return nil + } + // git stores minutes, go wants seconds loc := time.FixedZone("", int(sig.when.offset)*60) return &Signature{ |
