mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
Fix for bug #9891: added NULL pointer check in ContentInserted()
This commit is contained in:
parent
51fc2a157a
commit
b9d0bec0ea
@ -4027,6 +4027,7 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
static inline PRBool
|
||||
IsGeneratedContentFor(nsIContent* aContent, nsIFrame* aFrame)
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "null frame pointer");
|
||||
nsFrameState state;
|
||||
PRBool result = PR_FALSE;
|
||||
|
||||
@ -4375,7 +4376,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
|
||||
nsIFrame* firstChild;
|
||||
parentFrame->FirstChild(nsnull, &firstChild);
|
||||
|
||||
if (IsGeneratedContentFor(aContainer, firstChild)) {
|
||||
if (firstChild && IsGeneratedContentFor(aContainer, firstChild)) {
|
||||
// Insert the new frames after the :before pseudo-element
|
||||
prevSibling = firstChild;
|
||||
}
|
||||
|
@ -4027,6 +4027,7 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
static inline PRBool
|
||||
IsGeneratedContentFor(nsIContent* aContent, nsIFrame* aFrame)
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "null frame pointer");
|
||||
nsFrameState state;
|
||||
PRBool result = PR_FALSE;
|
||||
|
||||
@ -4375,7 +4376,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
|
||||
nsIFrame* firstChild;
|
||||
parentFrame->FirstChild(nsnull, &firstChild);
|
||||
|
||||
if (IsGeneratedContentFor(aContainer, firstChild)) {
|
||||
if (firstChild && IsGeneratedContentFor(aContainer, firstChild)) {
|
||||
// Insert the new frames after the :before pseudo-element
|
||||
prevSibling = firstChild;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user