From 27cf1524388db8c871b6c1de80fb3abf06fc655f Mon Sep 17 00:00:00 2001 From: Chernoskill Date: Sat, 6 Mar 2021 11:26:53 +0100 Subject: [PATCH] Update models_ue1.cpp --- src/common/models/models_ue1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/models/models_ue1.cpp b/src/common/models/models_ue1.cpp index 9214063025..68be56e616 100644 --- a/src/common/models/models_ue1.cpp +++ b/src/common/models/models_ue1.cpp @@ -243,7 +243,7 @@ void FUE1Model::RenderFrame( FModelRenderer *renderer, FGameTexture *skin, int f if ( !sskin ) { int ssIndex = groups[i].texNum + curMDLIndex * MD3_MAX_SURFACES; - if (curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid()) + if (curSpriteMDLFrame && curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid()) sskin = TexMan.GetGameTexture(curSpriteMDLFrame->surfaceskinIDs[ssIndex], true); if ( !sskin ) { @@ -306,7 +306,7 @@ void FUE1Model::AddSkins( uint8_t *hitlist ) for (int i = 0; i < numGroups; i++) { int ssIndex = groups[i].texNum + curMDLIndex * MD3_MAX_SURFACES; - if (curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid()) + if (curSpriteMDLFrame && curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid()) hitlist[curSpriteMDLFrame->surfaceskinIDs[ssIndex].GetIndex()] |= FTextureManager::HIT_Flat; } }