From d45a4f18d46f482847f8d54300c87d9dafd7cadc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Apr 2024 07:14:04 +0200 Subject: [PATCH] fix lifetime of skyinfo variable in HWWall::SkyPlane. --- src/rendering/hwrenderer/scene/hw_sky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rendering/hwrenderer/scene/hw_sky.cpp b/src/rendering/hwrenderer/scene/hw_sky.cpp index dfa954530..45ff8c5e7 100644 --- a/src/rendering/hwrenderer/scene/hw_sky.cpp +++ b/src/rendering/hwrenderer/scene/hw_sky.cpp @@ -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;