Skip to content

Commit bb45146

Browse files
authored
Fix a panic when moving a Cozy (#4509)
2 parents 2a449b3 + 7cb9339 commit bb45146

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

model/move/sharing.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func notifyMember(inst *instance.Instance, s *sharing.Sharing, index int) error
7070
return err
7171
}
7272

73+
if len(s.Credentials) == 0 {
74+
return errors.New("sharing in invalid state")
75+
}
7376
clientID := s.Credentials[0].InboundClientID
7477
if index > 0 {
7578
clientID = s.Credentials[index-1].InboundClientID

0 commit comments

Comments
 (0)