diff --git a/src/gl/data/gl_portaldata.cpp b/src/gl/data/gl_portaldata.cpp index 6640d2d4a..14a78c7a1 100644 --- a/src/gl/data/gl_portaldata.cpp +++ b/src/gl/data/gl_portaldata.cpp @@ -356,7 +356,7 @@ static void CollectPortalSectors(FPortalMap &collection) sector_t *sec = §ors[i]; for (int j = 0; j < 2; j++) { - ASkyViewpoint *SkyBox = sec->SkyBoxes[j]; + ASkyViewpoint *SkyBox = barrier_cast(sec->SkyBoxes[j]); if (SkyBox != NULL && SkyBox->bAlways && SkyBox->Mate != NULL) { FPortalID id = { SkyBox->X() - SkyBox->Mate->X(), SkyBox->Y() - SkyBox->Mate->Y() };