Skip to content

Fix goal selector iteration - #938

Closed
wling-art wants to merge 1 commit into
Winds-Studio:ver/26.2from
wling-art:fix/goal-selector-snapshot
Closed

wling-art wants to merge 1 commit into
Winds-Studio:ver/26.2from
wling-art:fix/goal-selector-snapshot

Conversation

@wling-art

Copy link
Copy Markdown
Member

修复 GoalSelector 遍历 goal 时增删 goal 导致的 NPE(类似于 #531 NPE 类的问题)

在 #465 中,在循环之前存好了数组和长度。但遍历中删除 goal 时,尾部被置 null,按旧长度读到 null 就会 NPE。数组扩容后,循环依旧在旧数组上跑。

@Dreeam-qwq Dreeam-qwq added the type: fix Pull request for fixing bug label Sep 25, 2026
@hayanesuru

hayanesuru commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

working as intended

@hayanesuru hayanesuru closed this Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Pull request for fixing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants