Fixed crash in stereoscopic modes caused by camera without player

https://forum.zdoom.org/viewtopic.php?t=55039&start=381#p1039251
This commit is contained in:
alexey.lysiuk 2018-02-07 11:37:02 +02:00
parent 18ad975c7a
commit ed23008069

View file

@ -842,7 +842,7 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
stereo3dMode.SetUp(); stereo3dMode.SetUp();
for (int eye_ix = 0; eye_ix < stereo3dMode.eye_count(); ++eye_ix) 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 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); const s3d::EyePose * eye = stereo3dMode.getEyePose(eye_ix);
eye->SetUp(); eye->SetUp();