1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-08 21:24:41 +08:00
Files
osu-lazer/osu.Game/Screens
T
maarvin 11f01113a1 Fix crash when dragging card as discard phase ends (#37419)
Closes: #37402

Issue was `HandOfCards.CardContainer.Compare` working under the
assumption that the it would never be called with the same child for
both entries, which can happen when doing a `BinarySearch` (called in
`RemoveInternal`).
This lead to `IndexOf` returning a negative value despite the card being
present in the container, and the drawable getting disposed but not
actually removed.

I also included a precautionary `cardContainer.Sort()` call before the
removal as well, seemed to work without that from testing but better not
rely on that.

TLDR: card container child sorting was unstable due to poor assumptions
11f01113a1 · 2026-04-20 10:58:27 +02:00
History
..
2026-04-10 20:27:21 +09:00
2026-04-18 19:52:52 +09:00
2026-03-19 00:05:52 +09:00