Skip to content

Commit 9d1d757

Browse files
committed
Attempt to fix skyinfo lifetime issue
This is probably not a proper fix, but I have no idea what a proper fix for this would be.
1 parent a938e9c commit 9d1d757

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rendering/hwrenderer/scene/hw_sky.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ void HWWall::SkyPlane(HWWallDispatcher *di, sector_t *sector, int plane, bool al
139139
{
140140
if (di->di)
141141
{
142-
HWSkyInfo skyinfo;
143-
skyinfo.init(di->di, sector, plane, sector->skytransfer, Colormap.FadeColor);
142+
HWSkyInfo* skyinfo = new HWSkyInfo;
143+
skyinfo->init(di->di, sector, plane, sector->skytransfer, Colormap.FadeColor);
144144
ptype = PORTALTYPE_SKY;
145-
sky = &skyinfo;
145+
sky = skyinfo;
146146
}
147147
PutPortal(di, ptype, plane);
148148
}

0 commit comments

Comments
 (0)