Commit a124117f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Remove selection and range objects from document list when detaching.

parent 18e0225a
......@@ -364,9 +364,10 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
void detach_selection(HTMLDocumentNode *This)
{
HTMLSelectionObject *iter;
HTMLSelectionObject *iter, *next;
LIST_FOR_EACH_ENTRY(iter, &This->selection_list, HTMLSelectionObject, entry) {
LIST_FOR_EACH_ENTRY_SAFE(iter, next, &This->selection_list, HTMLSelectionObject, entry) {
iter->doc = NULL;
list_remove(&iter->entry);
}
}
......@@ -1760,9 +1760,10 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx
void detach_ranges(HTMLDocumentNode *This)
{
HTMLTxtRange *iter;
HTMLTxtRange *iter, *next;
LIST_FOR_EACH_ENTRY(iter, &This->range_list, HTMLTxtRange, entry) {
LIST_FOR_EACH_ENTRY_SAFE(iter, next, &This->range_list, HTMLTxtRange, entry) {
iter->doc = NULL;
list_remove(&iter->entry);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment