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

unit_evolution.lua: Fix lua crash on Evolve() #3998

Merged

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Dec 5, 2024

Work done

  • Fix a lua crash at GameFrame in unit_evolution.lua

Addresses Issue(s)

Not sure the issue game crash is directly related, probably not, but it shows in the logs there.

Explanation

Evolve(...) is getting called at the first if evolutionMetaList[unitID].... That destroys the unit and seems the destroy callback gets called immediately thus invalidating evolutionMetaList[unitID] for the if right after that.

@saurtron saurtron changed the title unit_evolution.lua: Fix lua crash at on Evolve() unit_evolution.lua: Fix lua crash on Evolve() Dec 5, 2024
@saurtron saurtron mentioned this pull request Dec 6, 2024
@Ruwetuin Ruwetuin merged commit cc5a8de into beyond-all-reason:master Dec 6, 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.

3 participants