Skip to content

Commit

Permalink
gapis/api/sync: Don't explode if GetTerminator returns a nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton committed Aug 22, 2017
1 parent 83d8675 commit 02c2833
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gapis/api/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ func MutationCmdsFor(ctx context.Context, c *path.Capture, cmds []api.Cmd, id ap
if err != nil {
return nil, err
}
terminators = append(terminators, term)
} else {
terminators = append(terminators, transform.NewEarlyTerminator(api.ID()))
if term != nil {
terminators = append(terminators, term)
continue
}
}
terminators = append(terminators, transform.NewEarlyTerminator(api.ID()))
}
for _, t := range terminators {
if err := t.Add(ctx, id, subindex); err != nil {
Expand Down

0 comments on commit 02c2833

Please sign in to comment.