The channel data needs to be freed for some 2D Cider devices. This shows up with some of the examples/cider/parallel circuits.

This commit is contained in:
Brian Taylor 2023-07-05 15:58:15 -07:00 committed by Holger Vogt
parent c6edbe44db
commit 1e58692e6d
1 changed files with 9 additions and 3 deletions

View File

@ -74,6 +74,15 @@ TWOdestroy(TWOdevice *pDevice)
FREE( pDevice->elemArray );
}
if (pDevice->pChannel) {
TWOchannel* pCtmp = pDevice->pChannel;
while (pCtmp) {
TWOchannel* pCtmpnext = pCtmp->next;
FREE(pCtmp);
pCtmp = pCtmpnext;
}
}
if (pDevice->pMaterials) {
TWOmaterial* pMtmp = pDevice->pMaterials;
while (pMtmp) {
@ -105,9 +114,6 @@ TWOdestroy(TWOdevice *pDevice)
FREE(pDevice->yScale);
}
/* destroy the channels */
/* NOT IMPLEMENTED */
FREE( pDevice );
{
CiderLoaded(-1);