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

Invalid sight is breaking vision #4041

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented May 8, 2023

Identify the Bug or Feature request

#4037

Description of the Change

There are some situations where a token's sight is not actually a sight defined in the campaign. This is mostly handled by null checks, but this was missed when calculating illumination keys. In a similar vein, not all tokens have sight, and this is handled in much the same way as an undefined sight type.

This PR fixes the one place where we don't currently check the validity of the sight type, and where we also don't check if the token has sight: building the illumination key.

Possible Drawbacks

Should be none.

Documentation Notes

N/A

Release Notes

  • Fixed null pointer exception when adding images as tokens to campaigns with a "Normal" sight type.

This change is Reviewable

@cwisniew cwisniew merged commit da7275a into RPTools:release-1.13 May 8, 2023
@kwvanderlinde kwvanderlinde deleted the bugfix/4037-invalid-sight-is-breaking-vision branch May 9, 2023 04:17
@cwisniew cwisniew added the bug label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants