Skip to content

Commit

Permalink
engine: common: mod_studio: reject models with split textures files t…
Browse files Browse the repository at this point in the history
…hat cannot be loaded
  • Loading branch information
a1batross committed Jun 14, 2024
1 parent 73c7db8 commit 3064d40
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions engine/common/mod_studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,15 @@ void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded )
out = (byte *)phdr + phdr->textureindex;
memcpy( out, in, size1 + size2 ); // copy textures + skinrefs
phdr->length += size1 + size2;
}
else Con_Printf( S_WARN "%s: %s missing textures file\n", __func__, mod->name );

if( buffer2 )
Mem_Free( buffer2 ); // release T.mdl
}
else
{
Con_Printf( S_WARN "%s: %s missing textures file\n", __func__, mod->name );
if( buffer2 )
Mem_Free( buffer2 ); // release T.mdl
return;
}
}
#endif

Expand Down

0 comments on commit 3064d40

Please sign in to comment.