From 638e00710c62751dcfb05b3b78a1aaeaa7eb3416 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 10 Jun 2025 23:01:58 +0200 Subject: [PATCH] add missing plane bounds check to R_DrawSkyPlane --- src/r_plane.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 08bc385eb..1d4b1e2d1 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -746,6 +746,9 @@ static void R_DrawSkyPlane(visplane_t *pl, void(*colfunc2)(drawcolumndata_t*), b INT32 x; drawcolumndata_t dc = {}; + if (!(pl->minx <= pl->maxx)) + return; + // If we're not supposed to draw the sky (e.g. for skyboxes), don't do anything! // This probably utterly ruins sky rendering for FOFs and polyobjects, unfortunately if (!newview->sky)