Bug 221323: Keep a hard reference when moving nodes to avoid premature delete.

r/sr=bz
This commit is contained in:
sicking%bigfoot.com 2003-10-06 00:17:15 +00:00
Родитель ef87236cea
Коммит f1e0b952de
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -451,7 +451,7 @@ void txMozillaXMLOutput::closePrevious(PRInt8 aAction)
nsCOMPtr<nsIDOMNode> child, resultNode; nsCOMPtr<nsIDOMNode> child, resultNode;
PRUint32 i, childCount = document->GetChildCount(); PRUint32 i, childCount = document->GetChildCount();
for (i = 0; i < childCount; ++i) { for (i = 0; i < childCount; ++i) {
nsIContent *childContent = document->GetChildAt(0); nsCOMPtr<nsIContent> childContent = document->GetChildAt(0);
if (childContent == mRootContent) { if (childContent == mRootContent) {
document->SetRootContent(nsnull); document->SetRootContent(nsnull);
} }