aboutsummaryrefslogtreecommitdiff
path: root/cmd/kdev/record_extractor.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/kdev/record_extractor.go')
-rw-r--r--cmd/kdev/record_extractor.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/kdev/record_extractor.go b/cmd/kdev/record_extractor.go
index 2dc079e..5781077 100644
--- a/cmd/kdev/record_extractor.go
+++ b/cmd/kdev/record_extractor.go
@@ -55,12 +55,16 @@ func NewGoGitRecordExtractor(head *object.Commit, path string) *GoGitRecordExtra
}
func (re *GoGitRecordExtractor) Extract(keyword string, path string, line int) Record {
- return Record{
+ record := Record{
keyword: keyword,
path: path,
line: line,
- date: re.blame.Lines[line-1].Date,
}
+ if re != nil {
+ record.date = re.blame.Lines[line-1].Date
+ }
+
+ return record
}
type GitRecordExtractor struct {