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 assertion in api_methods_enemy_tile() #950

Merged
merged 1 commit into from
Mar 19, 2022
Merged

Conversation

ec429
Copy link
Contributor

@ec429 ec429 commented Mar 19, 2022

If lua Tile:is_enemy() is called on a tile with neither enemy units nor
a city, the call to city_owner() will be passed a NULL pcity.
Clearly the ptile != NULL guard was supposed to check pcity instead, so
do that.

If lua Tile:is_enemy() is called on a tile with neither enemy units nor
 a city, the call to city_owner() will be passed a NULL pcity.
Clearly the ptile != NULL guard was supposed to check pcity instead, so
 do that.
@lmoureaux lmoureaux merged commit 215b1a3 into longturn:master Mar 19, 2022
@ec429 ec429 deleted the luacity branch March 20, 2022 00:16
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.

2 participants