mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
Fixed crash on accessing player sprite's state in software renderer
https://forum.zdoom.org/viewtopic.php?t=60034
This commit is contained in:
parent
408a2f6dab
commit
709bbe3db0
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue