Fix for bug 17937. nsHTMLEditor::DeleteSelectionAndCreateNode() wasn't addref'ing an out parameter. r=sfraser.

This commit is contained in:
nisheeth%netscape.com 1999-11-22 00:01:18 +00:00
Родитель 42b105a390
Коммит ef4a4e4872
2 изменённых файлов: 2 добавлений и 0 удалений

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

@ -1634,6 +1634,7 @@ nsHTMLEditor::DeleteSelectionAndCreateNode(const nsString& aTag,
getter_AddRefs(newNode)); getter_AddRefs(newNode));
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases // XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
*aNewNode = newNode; *aNewNode = newNode;
NS_IF_ADDREF(*aNewNode);
// we want the selection to be just after the new node // we want the selection to be just after the new node
nsCOMPtr<nsIDOMSelection> selection; nsCOMPtr<nsIDOMSelection> selection;

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

@ -1634,6 +1634,7 @@ nsHTMLEditor::DeleteSelectionAndCreateNode(const nsString& aTag,
getter_AddRefs(newNode)); getter_AddRefs(newNode));
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases // XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
*aNewNode = newNode; *aNewNode = newNode;
NS_IF_ADDREF(*aNewNode);
// we want the selection to be just after the new node // we want the selection to be just after the new node
nsCOMPtr<nsIDOMSelection> selection; nsCOMPtr<nsIDOMSelection> selection;