mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +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");
|
CONS_Printf("HWR_InitModels()...\n");
|
||||||
|
|
||||||
if (numskins && md2_playermodels == NULL)
|
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++)
|
for (s = 0; s < numskins; s++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -239,8 +239,10 @@ void HWR_ReloadModels(void)
|
||||||
size_t i;
|
size_t i;
|
||||||
INT32 s;
|
INT32 s;
|
||||||
|
|
||||||
|
if (md2_playermodels != NULL)
|
||||||
for (s = 0; s < numskins; s++)
|
for (s = 0; s < numskins; s++)
|
||||||
{
|
{
|
||||||
|
CONS_Printf("%u\n", s);
|
||||||
if (md2_playermodels[s].model)
|
if (md2_playermodels[s].model)
|
||||||
LoadModelSprite2(md2_playermodels[s].model);
|
LoadModelSprite2(md2_playermodels[s].model);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue