git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3586
d7cf8633-e32d-0410-b094-
e92efae38249
if (tagentity != NULL && tagentity != sv.edicts && tagname && tagname[0])
{
modelindex = (int)tagentity->v->modelindex;
- if (modelindex >= 0 && modelindex < MAX_MODELS)
+ if (modelindex >= 0 && modelindex < MAX_MODELS && (model = sv.models[modelindex]))
{
- model = sv.models[modelindex];
if (model->data_overridetagnamesforskin && (unsigned int)tagentity->v->skin < (unsigned int)model->numskins && model->data_overridetagnamesforskin[(unsigned int)tagentity->v->skin].num_overridetagnames)
for (i = 0;i < model->data_overridetagnamesforskin[(unsigned int)tagentity->v->skin].num_overridetagnames;i++)
if (!strcmp(tagname, model->data_overridetagnamesforskin[(unsigned int)tagentity->v->skin].data_overridetagnames[i].name))