Bug 666751 - Add a null-check in case the item's frame is not a descendent of the text-overflow block. r=roc
authorMats Palmgren <matspal@gmail.com>
Fri, 24 Jun 2011 21:12:52 +0200
changeset 71681 0e4fb02265891627d8962964d6943166d4765102
parent 71680 c1ec764b3cd6ff1d10d65278794dda8ab505ef3d
child 71682 4f032c2cc14e0978df61a78301d57d692451f6ea
push id20591
push usermpalmgren@mozilla.com
push dateFri, 24 Jun 2011 19:15:18 +0000
treeherdermozilla-central@4f032c2cc14e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs666751
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 666751 - Add a null-check in case the item's frame is not a descendent of the text-overflow block. r=roc
layout/generic/TextOverflow.cpp
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -174,17 +174,17 @@ InflateRight(nsRect* aRect, bool aInfini
   }
 }
 
 static bool
 IsFrameDescendantOfAny(nsIFrame* aChild,
                        const TextOverflow::FrameHashtable& aSetOfFrames,
                        nsIFrame* aCommonAncestor)
 {
-  for (nsIFrame* f = aChild; f != aCommonAncestor;
+  for (nsIFrame* f = aChild; f && f != aCommonAncestor;
        f = nsLayoutUtils::GetCrossDocParentFrame(f)) {
     if (aSetOfFrames.GetEntry(f)) {
       return true;
     }
   }
   return false;
 }