bug 9848 - check for out of memory when calling new. r=dcone.

This commit is contained in:
karnaze@netscape.com
2000-11-30 15:53:55 +00:00
parent 276bf84298
commit c88090d762
12 changed files with 34 additions and 2 deletions

View File

@@ -1333,6 +1333,7 @@ GetCollapseOffsetProperty(nsIPresContext* aPresContext,
// The property isn't set yet, so allocate a new point, set the property,
// and return the newly allocated point
nsPoint* offset = new nsPoint(0, 0);
if (!offset) return nsnull;
frameManager->SetFrameProperty(aFrame, nsLayoutAtoms::collapseOffsetProperty,
offset, DestroyPointFunc);