gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2bf9bfa24ff5a85e27322f921ced5093a311dd73
parent 67919204af970803ba707cb40537dfd9ad811c27
Author: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
Date:   Sun,  8 Jan 2023 10:33:03 +0000

[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:
Minternal/processing/account/delete.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git 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