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 error when enabling texture packs in the "Content" tab #13829

Merged
merged 1 commit into from Sep 23, 2023

Conversation

grorp
Copy link
Member

@grorp grorp commented Sep 22, 2023

Since #13550, enabling or disabling texture packs in the "Content" tab triggers this error:

Runtime error from mod '??' in callback handleMainMenuButtons(): /mt/bin/../builtin/common/filterlist.lua:209: attempt to index local 'self' (a nil value)
stack traceback:
	/mt/bin/../builtin/common/filterlist.lua:209: in function 'size'
	/mt/bin/../builtin/mainmenu/tab_content.lua:69: in function 'get_formspec'
	/mt/bin/../builtin/fstk/tabview.lua:67: in function 'get_formspec'
	/mt/bin/../builtin/fstk/ui.lua:101: in function 'update'
	/mt/bin/../builtin/fstk/ui.lua:145: in function 'handle_buttons'
	/mt/bin/../builtin/fstk/ui.lua:186: in function </mt/bin/../builtin/fstk/ui.lua:172>

This PR fixes that by restoring the previous behavior of re-creating the filterlist in get_formspec if it is nil.

CC @rollerozxa

To do

This PR is a Ready for Review.

How to test

Verify that you can enable and disable texture packs without triggering an error dialog.

@grorp grorp added Bugfix 🐛 PRs that fix a bug @ Mainmenu labels Sep 22, 2023
@grorp grorp added this to the 5.8.0 milestone Sep 22, 2023
@grorp grorp added the Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines label Sep 23, 2023
@grorp grorp linked an issue Sep 23, 2023 that may be closed by this pull request
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error reproduced, fix reproduced. Works.

@grorp grorp merged commit 4cf900c into minetest:master Sep 23, 2023
2 checks passed
@grorp grorp deleted the tex-pack-fix branch December 18, 2023 16:39
kawogi pushed a commit to kawogi/minetest that referenced this pull request Dec 19, 2023
cosin15 pushed a commit to cosin15/minetest that referenced this pull request Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug @ Mainmenu One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors experienced when enabling texture packs
2 participants