diff --git a/src/polyrenderer/poly_renderer.cpp b/src/polyrenderer/poly_renderer.cpp index b01646fce..16b19c2b1 100644 --- a/src/polyrenderer/poly_renderer.cpp +++ b/src/polyrenderer/poly_renderer.cpp @@ -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();