- add null pointer check on camera (patch by dpJudas)

This commit is contained in:
drfrag666 2018-05-09 12:16:01 +02:00
parent f250bffbb4
commit 8aa4e84b84

View file

@ -140,10 +140,15 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
PolyCameraLight::Instance()->SetCamera(Viewpoint, RenderTarget, actor);
//Viewport->SetupFreelook();
ActorRenderFlags savedflags = Viewpoint.camera->renderflags;
// Never draw the player unless in chasecam mode
if (!Viewpoint.showviewer)
Viewpoint.camera->renderflags |= RF_INVISIBLE;
ActorRenderFlags savedflags = 0;
if (Viewpoint.camera)
{
savedflags = Viewpoint.camera->renderflags;
// Never draw the player unless in chasecam mode
if (!Viewpoint.showviewer)
Viewpoint.camera->renderflags |= RF_INVISIBLE;
}
ScreenTriangle::FuzzStart = (ScreenTriangle::FuzzStart + 14) % FUZZTABLE;
@ -161,7 +166,8 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
Scene.RenderTranslucent(&mainViewpoint);
PlayerSprites.Render(Threads.MainThread());
Viewpoint.camera->renderflags = savedflags;
if (Viewpoint.camera)
Viewpoint.camera->renderflags = savedflags;
interpolator.RestoreInterpolations ();
NetUpdate();