diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index eb431a5062e..e7dffd51300 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -1310,12 +1310,11 @@ void nsViewManager :: UpdateDirtyViews(nsIView *aView, nsRect *aParentRect) cons void nsViewManager::ProcessPendingUpdates(nsIView* aView) { - nsIRegion* dirtyRegion = nsnull; - aView->GetDirtyRegion(dirtyRegion); + nsCOMPtr dirtyRegion; + aView->GetDirtyRegion(*getter_AddRefs(dirtyRegion)); if (dirtyRegion != nsnull && !dirtyRegion->IsEmpty()) { UpdateView(aView, dirtyRegion, 0); dirtyRegion->Init(); - NS_RELEASE(dirtyRegion); } // process pending updates in child view.