diff --git a/src/rendering/hwrenderer/scene/hw_sky.cpp b/src/rendering/hwrenderer/scene/hw_sky.cpp index dfa954530f8..45ff8c5e798 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;