fix lifetime of skyinfo variable in HWWall::SkyPlane.

This commit is contained in:
Christoph Oelckers 2024-04-22 07:14:04 +02:00 committed by Rachael Alexanderson
parent 387e59cba7
commit 98a0b5f8d2
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

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;