- fixed crash with particles checking a non-existent actor.

This commit is contained in:
Christoph Oelckers 2020-04-18 22:20:15 +02:00
parent c836dd3dbf
commit 46e75e8107
2 changed files with 2 additions and 2 deletions

View File

@ -374,7 +374,7 @@ public:
FImageTexture(FImageSource* image) noexcept;
virtual TArray<uint8_t> Get8BitPixels(bool alphatex);
void SetImage(FImageSource* img) // This is only for the multipatch texture builder!
void SetImage(FImageSource* img)
{
mImage = img;
SetFromImage();

View File

@ -197,7 +197,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
state.SetFog(0, 0);
}
uint32_t spritetype = (actor->renderflags & RF_SPRITETYPEMASK);
uint32_t spritetype = actor? uint32_t(actor->renderflags & RF_SPRITETYPEMASK) : 0;
if (texture) state.SetMaterial(texture, UF_Sprite, (spritetype == RF_FACESPRITE) ? CTF_Expand : 0, CLAMP_XY, translation, OverrideShader);
else if (!modelframe) state.EnableTexture(false);