diff --git a/src/polyrenderer/scene/poly_playersprite.cpp b/src/polyrenderer/scene/poly_playersprite.cpp index faf2f2a9a..5626e6f7b 100644 --- a/src/polyrenderer/scene/poly_playersprite.cpp +++ b/src/polyrenderer/scene/poly_playersprite.cpp @@ -354,7 +354,8 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p invertcolormap = !invertcolormap; } - bool fullbright = !foggy && pspr->GetState()->GetFullbright(); + const FState* const psprState = pspr->GetState(); + bool fullbright = !foggy && (psprState == nullptr ? false : psprState->GetFullbright()); bool fadeToBlack = (vis.RenderStyle.Flags & STYLEF_FadeToBlack) != 0; vis.Light.SetColormap(0, spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack); diff --git a/src/swrenderer/things/r_playersprite.cpp b/src/swrenderer/things/r_playersprite.cpp index b0021ca32..240f8e0c2 100644 --- a/src/swrenderer/things/r_playersprite.cpp +++ b/src/swrenderer/things/r_playersprite.cpp @@ -357,7 +357,8 @@ namespace swrenderer invertcolormap = !invertcolormap; } - bool fullbright = !foggy && pspr->GetState()->GetFullbright(); + const FState* const psprState = pspr->GetState(); + bool fullbright = !foggy && (psprState == nullptr ? false : psprState->GetFullbright()); bool fadeToBlack = (vis.RenderStyle.Flags & STYLEF_FadeToBlack) != 0; vis.Light.SetColormap(0, spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack);