Commit 4321f480 authored by Janis Born's avatar Janis Born

fix possible crash in SimpleRiftController when no HMD is connected

parent 4c015e71
......@@ -150,15 +150,16 @@ SimpleRiftController::~SimpleRiftController()
void SimpleRiftController::setPrediction( float _seconds )
{
if(getSuccessfulConnected()) {
if ( _seconds >= 0.0f ) {
mORSensorFusion->SetPrediction( _seconds );
} else {
mORSensorFusion->SetPrediction( 0.0f, false );
}
mPredictionTime = _seconds;
}
}
glm::mat4 SimpleRiftController::getProjectionMatrixFromCamera()
{
if (!mCamera) return glm::mat4();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment