Skip to content

Commit

Permalink
Fixed crash in stereoscopic modes caused by camera without player
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Feb 7, 2018
1 parent 18ad975 commit ed23008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gl/scene/gl_scene.cpp
Expand Up @@ -842,7 +842,7 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
stereo3dMode.SetUp();
for (int eye_ix = 0; eye_ix < stereo3dMode.eye_count(); ++eye_ix)
{
if (eye_ix > 0)
if (eye_ix > 0 && camera->player)
SetFixedColormap(camera->player); // reiterate color map for each eye, so night vision goggles work in both eyes
const s3d::EyePose * eye = stereo3dMode.getEyePose(eye_ix);
eye->SetUp();
Expand Down

0 comments on commit ed23008

Please sign in to comment.