mshtml: Don't access released object in release_script_hosts.

oldstable
Jacek Caban 2008-03-27 19:08:07 +01:00 committed by Alexandre Julliard
parent 6bc8e9a116
commit 7b48298e27
1 changed files with 5 additions and 2 deletions

View File

@ -304,8 +304,11 @@ void release_script_hosts(HTMLDocument *doc)
{
ScriptHost *iter;
LIST_FOR_EACH_ENTRY(iter, &doc->script_hosts, ScriptHost, entry) {
while(!list_empty(&doc->script_hosts)) {
iter = LIST_ENTRY(list_head(&doc->script_hosts), ScriptHost, entry);
list_remove(&iter->entry);
iter->doc = NULL;
IActiveScriptSite_Release(ACTSCPSITE(iter));
IActiveScript_Release(ACTSCPSITE(iter));
}
}