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 crash caused by conflicting menu option IDs #85227

Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Nov 22, 2023

Regression from #85150
Trying to make new Script or new Shader was interpreted as Show in Filesystem (which shifted to 10) and resulted in get_path() call on null resource.

@YuriSizov
Copy link
Contributor

YuriSizov commented Nov 22, 2023

I should've spotted it earlier, but technically any change to this enum could create conflicts with user projects if they extend and customize the resource picker. We expose hooks to add custom options to this menu and users can provide any IDs they want. We should probably suggest they use some safe range with a high base number in the documentation.

As far as this PR, it should be fine (user projects can't extend script and shader pickers), and starting with 10 was a bit... optimistic on my part 🙃

@akien-mga akien-mga merged commit fa4a653 into godotengine:master Nov 22, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the when_two_IDs_fight_the_editor_suffers branch November 22, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants