Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Conversation

@michael-r-elp
Copy link
Contributor

When joining a lobby in Multiplayer where a map is currently being played that can't be played, for example DLC not being owned, the game sets difficultyBeatmap to nullptr to indicate that the player should be put into spectator with the not owned message.
This fixes the crash that happens with PinkCore trying to access data on a nullptr difficultyBeatmap.

@RedBrumbler
Copy link
Collaborator

are you sure this actually fixes that crash? isCustom also performs a null check, so it being null would still result in the early return code being ran

https://github.com/BSMGPink/PinkCore/blob/d4bd915b7715c877226a3bef60691b55e2b4116c/src/Utils/SongUtils.cpp#L549-L553

@michael-r-elp
Copy link
Contributor Author

The IPreviewBeatmapLevel is not null and should never be, which is why it's not being caught

@RedBrumbler
Copy link
Collaborator

my bad, I thought it added null checking the IPreviewBeatmapLevel, but it's the IDifficultyBeatmap, yeah looks fine to be merged then.

@RedBrumbler RedBrumbler merged commit 8e660c3 into ModdingPink:master Mar 17, 2023
@michael-r-elp michael-r-elp deleted the patch-1 branch March 17, 2023 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants