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

OculusHandPointerModel: Make _onDisconnected() more robust. #26387

Merged
merged 1 commit into from Jul 7, 2023

Conversation

hybridherbst
Copy link
Contributor

Related issue:

Description

In applications supporting both hands and controllers, and dynamic switching between them, it's quite common to create a hand pointer model early on even if no hand is connected at that point.
Using controllers will then cause the connected event to fire, no hand model being created (because the connected thing is not a hand) but then on session exit the current code tries to dispose the non-existant hand and pointer model.

This PR just checks if they exist before disposing them. cc @CodyJasonBennett

This contribution is funded by Needle

@Mugen87 Mugen87 added this to the r155 milestone Jul 7, 2023
@Mugen87 Mugen87 merged commit e41d3fe into mrdoob:dev Jul 7, 2023
18 checks passed
@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 7, 2023

Minor clean up: 95fbc39

@Mugen87 Mugen87 changed the title Fixes error when hand models are disconnected on XR exit when not being connected to a hand in the first place OculusHandPointerModel: Make _onDisconnected() more robust. Jul 7, 2023
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.

None yet

2 participants