Skip to content

Make sure InputEventPtr is valid when marking it as handled#1601

Merged
andrew-oc merged 1 commit intodevelopfrom
fix-ISXB-330
Oct 25, 2022
Merged

Make sure InputEventPtr is valid when marking it as handled#1601
andrew-oc merged 1 commit intodevelopfrom
fix-ISXB-330

Conversation

@andrew-oc
Copy link
Copy Markdown
Contributor

Description

InvalidOperationExceptions were thrown when setting the current InputEventPtr handled property to true if the state was switched to "performed" by an interaction timeout. This is because the cached InputEventPtr is not valid after the event has been processed.

Changes made

Check the pointer is valid before setting it to handled.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
    • FogBugz is marked as "Resolved" with next release version correctly set.
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

It might not be valid if the state is switching due to an interaction timeout
@andrew-oc andrew-oc merged commit 573f4ff into develop Oct 25, 2022
@andrew-oc andrew-oc deleted the fix-ISXB-330 branch October 25, 2022 17:18
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