diff --git a/Quake/r_part_fte.c b/Quake/r_part_fte.c index 4dbd68ac..7dc03059 100644 --- a/Quake/r_part_fte.c +++ b/Quake/r_part_fte.c @@ -3570,6 +3570,8 @@ void PScript_RecalculateSkyTris (void) /*in quakespasm there are always two textures added on the end (rather than pointing to textures outside the model)*/ for (t = 0; t < m->numtextures-2; t++) { + if (!m->textures[t]) + continue; if (!q_strcasecmp(key+8, m->textures[t]->name)) remaps[t] = PScript_FindParticleType(com_token); } @@ -3580,7 +3582,7 @@ void PScript_RecalculateSkyTris (void) for (t = 0; t < m->numtextures; t++) { ptype = remaps[t]; - if (ptype == P_INVALID) + if (ptype == P_INVALID && m->textures[t]) ptype = PScript_FindParticleType(va("tex_%s", m->textures[t]->name)); if (ptype >= 0)