mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
engine: client: turn some asserts in texture remap code into proper nullptr checks
This commit is contained in:
parent
3756361cfe
commit
8c5db5f980
@ -134,7 +134,8 @@ static void CL_DuplicateTexture( cl_entity_t *entity, model_t *model, mstudiotex
|
||||
break; // found
|
||||
}
|
||||
|
||||
Assert( tx != NULL );
|
||||
if( !tx )
|
||||
return;
|
||||
|
||||
// backup original palette
|
||||
pal = (byte *)(tx + 1) + (tx->width * tx->height);
|
||||
@ -175,7 +176,8 @@ static void CL_UpdateStudioTexture( cl_entity_t *entity, mstudiotexture_t *ptext
|
||||
|
||||
Q_snprintf( texname, sizeof( texname ), "#%s/%s.mdl", mdlname, name );
|
||||
index = ref.dllFuncs.GL_FindTexture( texname );
|
||||
if( !index ) return; // couldn't find texture
|
||||
if( !index )
|
||||
return; // couldn't find texture
|
||||
|
||||
// search for pixels
|
||||
for( i = 0; i < entity->model->numtextures; i++ )
|
||||
@ -185,7 +187,8 @@ static void CL_UpdateStudioTexture( cl_entity_t *entity, mstudiotexture_t *ptext
|
||||
break; // found
|
||||
}
|
||||
|
||||
Assert( tx != NULL );
|
||||
if( !tx )
|
||||
return; // couldn't find texture
|
||||
|
||||
// backup original palette
|
||||
pal = (byte *)(tx + 1) + (tx->width * tx->height);
|
||||
|
Loading…
Reference in New Issue
Block a user