From a67dd633ffd928b5af1f15899c1b474b58a7aa55 Mon Sep 17 00:00:00 2001
From: Jaime Passos <lazymyuutsu@gmail.com>
Date: Sat, 7 Sep 2019 19:02:50 -0300
Subject: [PATCH] if that function can't return NULL why should i do this?

---
 src/r_plane.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/r_plane.c b/src/r_plane.c
index a5b167015b..de5bf9f003 100644
--- a/src/r_plane.c
+++ b/src/r_plane.c
@@ -758,18 +758,8 @@ static UINT8 *R_GetPatchFlat(levelflat_t *levelflat, boolean leveltexture, boole
 			{
 				levelflat->flatpatch = R_PNGToFlat(levelflat, ds_source, W_LumpLength(levelflat->lumpnum));
 				levelflat->topoffset = levelflat->leftoffset = 0;
-				if (levelflat->flatpatch == NULL)
-				{
-					lumpnum_t redflr = W_CheckNumForName("REDFLR");
-					levelflat->flatpatch = (UINT8 *)W_CacheLumpNum(redflr, PU_CACHE);
-					R_CheckFlatLength(W_LumpLength(redflr));
-					R_CheckPowersOfTwo();
-				}
-				else
-				{
-					ds_flatwidth = levelflat->width;
-					ds_flatheight = levelflat->height;
-				}
+				ds_flatwidth = levelflat->width;
+				ds_flatheight = levelflat->height;
 			}
 			else
 #endif
-- 
GitLab