mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Don't dealloc if there is no frame in the channel
This commit is contained in:
parent
546ded324e
commit
1d50fa088a
1 changed files with 4 additions and 2 deletions
|
@ -261,15 +261,17 @@ void skelAnimDataGameHeader_s::DeallocAnimData(skelAnimDataGameHeader_t *data)
|
|||
{
|
||||
skanChannelHdr *pChannel;
|
||||
int i;
|
||||
int channelType;
|
||||
|
||||
if (!data || data == (skelAnimDataGameHeader_t *)-476) {
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < data->nTotalChannels; i++) {
|
||||
pChannel = &data->ary_channels[i];
|
||||
channelType = GetBoneChannelType(data->channelList.ChannelName(skeletor_c::ChannelNames(), i));
|
||||
|
||||
if (pChannel->ary_frames) {
|
||||
if (channelType != 2) {
|
||||
Skel_Free(pChannel->ary_frames);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue