summaryrefslogtreecommitdiff
path: root/internal/processing/account/delete.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-01-08 10:33:03 +0000
committerLibravatar GitHub <noreply@github.com>2023-01-08 11:33:03 +0100
commit2bf9bfa24ff5a85e27322f921ced5093a311dd73 (patch)
tree292103a6d293c71441e098598671b057141a3dae /internal/processing/account/delete.go
parent[chore/frogend] update status blockquote css (#1302) (diff)
downloadgotosocial-2bf9bfa24ff5a85e27322f921ced5093a311dd73.tar.xz
[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>
Diffstat (limited to 'internal/processing/account/delete.go')
-rw-r--r--internal/processing/account/delete.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/processing/account/delete.go b/internal/processing/account/delete.go
index ca8647933..b06a7b960 100644
--- a/internal/processing/account/delete.go
+++ b/internal/processing/account/delete.go
@@ -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