From 7b83345c75d8350c1875765d292b588d257a71a2 Mon Sep 17 00:00:00 2001 From: katsy Date: Wed, 14 Apr 2021 19:29:53 -0500 Subject: [PATCH] need to create the patches here if they don't already exist --- src/y_inter.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/y_inter.c b/src/y_inter.c index 6833ca2b5..dca8cd377 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -266,6 +266,14 @@ void Y_LoadIntermissionData(void) case int_ctf: case int_teammatch: { + if (!rflagico) //prevent a crash if we haven't cached our team graphics yet + { + rflagico = W_CachePatchName("RFLAGICO", PU_HUDGFX); + bflagico = W_CachePatchName("BFLAGICO", PU_HUDGFX); + rmatcico = W_CachePatchName("RMATCICO", PU_HUDGFX); + bmatcico = W_CachePatchName("BMATCICO", PU_HUDGFX); + } + data.match.redflag = (intertype == int_ctf) ? rflagico : rmatcico; data.match.blueflag = (intertype == int_ctf) ? bflagico : bmatcico; }