- fixed problems deallocation sicsobjects
This commit is contained in:
@ -450,12 +450,11 @@ void DeleteInterp(SicsInterp * self)
|
||||
if (tail) {
|
||||
pCurrent = tail;
|
||||
while (pCurrent) {
|
||||
/* the line below fixes problems with kill functions
|
||||
* traversing the command list
|
||||
*/
|
||||
pCurrent->pNext = NULL;
|
||||
pCurrent->pNext = NULL; /* inhibit access to killed commands by FindCommandData */
|
||||
if (pCurrent->KFunc) {
|
||||
pCurrent->KFunc(pCurrent->pData);
|
||||
void *data = pCurrent->pData;
|
||||
pCurrent->pData = NULL; /* make data unreachable by FindCommandData before killing */
|
||||
pCurrent->KFunc(data);
|
||||
}
|
||||
if (pCurrent->pName) {
|
||||
/* printf("Deleting %s\n",pCurrent->pName); */
|
||||
|
Reference in New Issue
Block a user