mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 18:12:34 +02:00
Prevent crashes in openvr on shutdown
By ensuring that there is an opengl context is bound before calling VR_Shutdown()
This commit is contained in:
parent
abb05bc686
commit
973ee544fb
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ void ViveControllerManager::deactivate() {
|
|||
_container->removeMenu(MENU_PATH);
|
||||
|
||||
if (_system) {
|
||||
_container->makeRenderingContextCurrent();
|
||||
releaseOpenVrSystem();
|
||||
_system = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue