Fix leaks caused by bug 307532. Patch by biesi, r+sr=bzbarsky

This commit is contained in:
bzbarsky%mit.edu 2005-10-29 16:16:35 +00:00
Родитель 07620aae6a
Коммит aeaa001221
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -2079,9 +2079,10 @@ nsTextFrame::GetSelectionStatus(nsPresContext* aPresContext,
{
NS_ENSURE_ARG_POINTER(aPresContext);
//get the selection controller
nsISelectionController* selectionController;
nsresult rv = GetSelectionController(aPresContext, &selectionController);
// get the selection controller
nsCOMPtr<nsISelectionController> selectionController;
nsresult rv = GetSelectionController(aPresContext,
getter_AddRefs(selectionController));
if (NS_FAILED(rv) || !selectionController)
return NS_ERROR_FAILURE;