Skip to content

Commit

Permalink
Fix nil deref in case of shard building error
Browse files Browse the repository at this point in the history
Change-Id: Idfa5036453521de249a6428d6f4fc2acbddc04e8
  • Loading branch information
hanwen committed Jun 28, 2017
1 parent b123b47 commit 4064298
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ func (b *Builder) flush() error {
if err != nil && b.buildError == nil {
b.buildError = err
}
b.finishedShards[done.temp] = done.final
if err == nil {
b.finishedShards[done.temp] = done.final
}
b.building.Done()
}()
} else {
Expand Down

0 comments on commit 4064298

Please sign in to comment.