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: initialize list with model #40

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Conversation

muesli
Copy link
Contributor

@muesli muesli commented Nov 16, 2022

Model.list didn't get properly initialized until Model.updateWindowSize got called. In some situations onProfilesLoaded can arrive before the terminal dimensions have been retrieved however, and calling it will call updatePagination which accesses the still uninitialized (nil) item delegate. This causes a crash.

Fixes #38.

Model.list didn't get properly initialized until
Model.updateWindowSize got called. In some situations
onProfilesLoaded can arrive before the terminal dimensions have
been retrieved however, and calling it will call updatePagination
which accesses the still uninitialized (nil) item delegate. This
causes a crash.

Fixes orlangure#38.
@orlangure
Copy link
Owner

Thank you for taking care of this annoying bug 😼

@orlangure orlangure merged commit 08dd060 into orlangure:master Nov 17, 2022
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.

Bug: nil pointer
3 participants