fix lifetime of skyinfo variable in HWWall::SkyPlane.

This commit is contained in:
Christoph Oelckers 2024-04-22 07:14:04 +02:00
parent a938e9c66c
commit d45a4f18d4

View file

@ -137,9 +137,9 @@ void HWWall::SkyPlane(HWWallDispatcher *di, sector_t *sector, int plane, bool al
// Either a regular sky or a skybox with skyboxes disabled
if ((sportal == nullptr && sector->GetTexture(plane) == skyflatnum) || (gl_noskyboxes && sportal != nullptr && sportal->mType == PORTS_SKYVIEWPOINT))
{
HWSkyInfo skyinfo;
if (di->di)
{
HWSkyInfo skyinfo;
skyinfo.init(di->di, sector, plane, sector->skytransfer, Colormap.FadeColor);
ptype = PORTALTYPE_SKY;
sky = &skyinfo;