Merge pull request from hyperlogic/bug-fix/more-openvr-shutdown-crashes

Prevent crashes in openvr on shutdown
This commit is contained in:
Brad Davis 2016-10-12 13:54:56 -07:00 committed by GitHub
commit 2d6522a76f
2 changed files with 3 additions and 1 deletions

View file

@ -445,8 +445,9 @@ void OpenVrDisplayPlugin::internalDeactivate() {
_openVrDisplayActive = false;
_container->setIsOptionChecked(StandingHMDSensorMode, false);
if (_system) {
// Invalidate poses. It's fine if someone else sets these shared values, but we're about to stop updating them, and
// TODO: Invalidate poses. It's fine if someone else sets these shared values, but we're about to stop updating them, and
// we don't want ViveControllerManager to consider old values to be valid.
_container->makeRenderingContextCurrent();
releaseOpenVrSystem();
_system = nullptr;
}

View file

@ -132,6 +132,7 @@ void ViveControllerManager::deactivate() {
_container->removeMenu(MENU_PATH);
if (_system) {
_container->makeRenderingContextCurrent();
releaseOpenVrSystem();
_system = nullptr;
}