Added NULL pointer check

This commit is contained in:
troy%netscape.com 1999-09-13 22:07:15 +00:00
parent 06ea3cca41
commit 97c0000d30
2 changed files with 18 additions and 14 deletions

View File

@ -5750,13 +5750,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
isAppend = PR_TRUE;
shell->GetPrimaryFrameFor(aContainer, &parentFrame);
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
if (parentFrame) {
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
}
}
}

View File

@ -5750,13 +5750,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
isAppend = PR_TRUE;
shell->GetPrimaryFrameFor(aContainer, &parentFrame);
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
if (parentFrame) {
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
}
}
}