mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-08 21:03:06 +02:00
Fix for crash in openvr on startup
pluginActivate can fail and return false, when steamvr is in a "Not Ready" state. In practice this can occur on a botched steamvr install, or when the vr compositor process is unable to start. When pluginActivate returns false, there's some sort of race condition where pluginUpdate will still be called. But it's only reproducible in release builds, without the debugger attached. This commit prevents pluginUpdate from crashing by making sure that the openvr _system ptr is valid first.
This commit is contained in:
parent
d25a4fb1cb
commit
1ea018db1d
1 changed files with 5 additions and 0 deletions
|
@ -210,6 +210,11 @@ void ViveControllerManager::renderHand(const controller::Pose& pose, gpu::Batch&
|
|||
|
||||
|
||||
void ViveControllerManager::pluginUpdate(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {
|
||||
|
||||
if (!_system) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
|
||||
handleOpenVrEvents();
|
||||
if (openVrQuitRequested()) {
|
||||
|
|
Loading…
Reference in a new issue