mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix some crashes
This commit is contained in:
parent
f9723a567c
commit
f2472d88b8
2 changed files with 8 additions and 6 deletions
|
@ -492,7 +492,7 @@ void HWR_InitModels(void)
|
|||
CONS_Printf("HWR_InitModels()...\n");
|
||||
|
||||
if (numskins && md2_playermodels == NULL)
|
||||
md2_playermodels = Z_Malloc(sizeof(md2_t), PU_STATIC, NULL);
|
||||
md2_playermodels = Z_Malloc(sizeof(md2_t) * numskins, PU_STATIC, NULL);
|
||||
|
||||
for (s = 0; s < numskins; s++)
|
||||
{
|
||||
|
|
|
@ -239,11 +239,13 @@ void HWR_ReloadModels(void)
|
|||
size_t i;
|
||||
INT32 s;
|
||||
|
||||
for (s = 0; s < numskins; s++)
|
||||
{
|
||||
if (md2_playermodels[s].model)
|
||||
LoadModelSprite2(md2_playermodels[s].model);
|
||||
}
|
||||
if (md2_playermodels != NULL)
|
||||
for (s = 0; s < numskins; s++)
|
||||
{
|
||||
CONS_Printf("%u\n", s);
|
||||
if (md2_playermodels[s].model)
|
||||
LoadModelSprite2(md2_playermodels[s].model);
|
||||
}
|
||||
|
||||
for (i = 0; i < NUMSPRITES; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue