Skip to content

Commit

Permalink
belt-and-suspenders nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Nov 24, 2020
1 parent 8b88e59 commit 2188df3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nomad/state/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,9 @@ func (s *StateStore) CSIVolumeDenormalize(ws memdb.WatchSet, vol *structs.CSIVol

// CSIVolumeDenormalizeTxn populates a CSIVolume with allocations
func (s *StateStore) CSIVolumeDenormalizeTxn(txn Txn, ws memdb.WatchSet, vol *structs.CSIVolume) (*structs.CSIVolume, error) {

if vol == nil {
return nil, nil
}
for id := range vol.ReadAllocs {
a, err := s.allocByIDImpl(txn, ws, id)
if err != nil {
Expand Down

0 comments on commit 2188df3

Please sign in to comment.