forked from mirrors/gotosocial
[bugfix] fix panic during status delete loop by breaking out early on len(statuses) == 0 (#1317)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
67919204af
commit
2bf9bfa24f
1 changed files with 4 additions and 0 deletions
|
@ -157,6 +157,10 @@ func (p *processor) Delete(ctx context.Context, account *gtsmodel.Account, origi
|
|||
break
|
||||
}
|
||||
|
||||
if len(statuses) == 0 {
|
||||
break // reached end
|
||||
}
|
||||
|
||||
for _, status := range statuses {
|
||||
// Ensure account is set
|
||||
status.Account = account
|
||||
|
|
Loading…
Reference in a new issue