vbscript: Make sure to remove an object from object list in collect_objects.

This commit is contained in:
Jacek Caban 2011-10-14 13:51:15 +02:00 committed by Alexandre Julliard
parent 4b9d21843c
commit c90c39304f
1 changed files with 5 additions and 1 deletions

View File

@ -495,10 +495,14 @@ void collect_objects(script_ctx_t *ctx)
LIST_FOR_EACH_ENTRY_SAFE(iter, iter2, &ctx->objects, vbdisp_t, entry)
run_terminator(iter);
LIST_FOR_EACH_ENTRY_SAFE(iter, iter2, &ctx->objects, vbdisp_t, entry) {
while(!list_empty(&ctx->objects)) {
iter = LIST_ENTRY(list_head(&ctx->objects), vbdisp_t, entry);
IDispatchEx_AddRef(&iter->IDispatchEx_iface);
clean_props(iter);
iter->desc = NULL;
list_remove(&iter->entry);
list_init(&iter->entry);
IDispatchEx_Release(&iter->IDispatchEx_iface);
}
}