Skip to content

Commit

Permalink
bugfix: avoid nil point
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Nov 25, 2020
1 parent c306654 commit 2c80812
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpc/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ func toCoreExecuteWorkloadOptions(b *pb.ExecuteWorkloadOptions) (opts *types.Exe
}

func toRPCCapacityMessage(msg *types.CapacityMessage) *pb.CapacityMessage {
if msg == nil {
return nil
}
caps := map[string]int64{}
for nodename, capacity := range msg.NodeCapacities {
caps[nodename] = int64(capacity)
Expand Down

0 comments on commit 2c80812

Please sign in to comment.