*fixed a crash bug when using an iterator in a conditional expression.

This commit is contained in:
Wang Renxin 2018-11-05 11:42:53 +08:00
parent 685d352a55
commit 3eff55c2aa
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,6 @@
Nov. 5 2018
Fixed a crash bug when using an iterator in a conditional expression
Jul. 30 2018
Fixed a crash bug with incomplete structures

View File

@ -15827,9 +15827,22 @@ _exit:
*l = ast;
if(val->type != _DT_UNKNOWN)
switch(val->type) {
#ifdef MB_ENABLE_COLLECTION_LIB
case _DT_LIST_IT: /* Fall through */
case _DT_DICT_IT:
_destroy_object_capsule_only(val, 0);
break;
#endif /* MB_ENABLE_COLLECTION_LIB */
case _DT_UNKNOWN: /* Do nothing */
break;
default:
_destroy_object(val, 0);
break;
}
return result;
}