From c0c1b8de90b94589e81d6c2d0565938e9042ed0a Mon Sep 17 00:00:00 2001
From: pastel <hazepastel@proton.me>
Date: Sat, 1 Jun 2024 14:40:44 -0500
Subject: [PATCH] don't adjust texture coords of nonexistant gpatch

---
 src/hardware/hw_md2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c
index 0bb8de851b..1c198a1663 100644
--- a/src/hardware/hw_md2.c
+++ b/src/hardware/hw_md2.c
@@ -1154,6 +1154,9 @@ static void adjustTextureCoords(model_t *model, patch_t *patch)
 	int i;
 	GLPatch_t *gpatch = ((GLPatch_t *)patch->hardware);
 
+	if (!gpatch)
+		return;
+
 	for (i = 0; i < model->numMeshes; i++)
 	{
 		int j;
-- 
GitLab