Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app crash when clicking spaces after slide page items in presentation demo. #976

Merged
merged 1 commit into from May 24, 2024

Conversation

Zhwt
Copy link
Contributor

@Zhwt Zhwt commented Apr 29, 2024

The SetHighlightedFunc function is missing boundary check, so when clicking outside of available item list, it will panic with out of bound error.

SetHighlightedFunc(func(added, removed, remaining []string) {
pages.SwitchToPage(added[0])
})

Fixed by checking slice length first.

@rivo rivo merged commit a5d0232 into rivo:master May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants