diff --git a/src/gl/scene/gl_renderhacks.cpp b/src/gl/scene/gl_renderhacks.cpp
index 30de38eb7..00bab423a 100644
--- a/src/gl/scene/gl_renderhacks.cpp
+++ b/src/gl/scene/gl_renderhacks.cpp
@@ -674,7 +674,7 @@ void FDrawInfo::DrawUnhandledMissingTextures()
 		if (seg->PartnerSeg && (seg->PartnerSeg->Subsector->flags & SSECF_DEGENERATE)) continue;
 		if (seg->backsector->transdoor) continue;
 		if (seg->backsector->GetTexture(sector_t::ceiling) == skyflatnum) continue;
-		if (seg->backsector->portals[sector_t::ceiling] != NULL) continue;
+		if (seg->backsector->ValidatePortal(sector_t::ceiling) != NULL) continue;
 
 		if (!glset.notexturefill) FloodUpperGap(seg);
 	}
@@ -693,7 +693,7 @@ void FDrawInfo::DrawUnhandledMissingTextures()
 		if (seg->frontsector->GetPlaneTexZF(sector_t::floor) > ViewPos.Z) continue;	// out of sight
 		if (seg->backsector->transdoor) continue;
 		if (seg->backsector->GetTexture(sector_t::floor) == skyflatnum) continue;
-		if (seg->backsector->portals[sector_t::floor] != NULL) continue;
+		if (seg->backsector->ValidatePortal(sector_t::floor) != NULL) continue;
 
 		if (!glset.notexturefill) FloodLowerGap(seg);
 	}
diff --git a/src/gl/scene/gl_sky.cpp b/src/gl/scene/gl_sky.cpp
index 67ac94103..d556dcdab 100644
--- a/src/gl/scene/gl_sky.cpp
+++ b/src/gl/scene/gl_sky.cpp
@@ -154,7 +154,7 @@ void GLWall::SkyPlane(sector_t *sector, int plane, bool allowreflect)
 		case PORTS_PORTAL:
 		case PORTS_LINKEDPORTAL:
 		{
-			FPortal *glport = sector->portals[plane];
+			FPortal *glport = sector->GetGLPortal(plane);
 			if (glport != NULL)
 			{
 				if (sector->PortalBlocksView(plane)) return;