Index: Source/core/rendering/RenderTableRow.cpp |
diff --git a/Source/core/rendering/RenderTableRow.cpp b/Source/core/rendering/RenderTableRow.cpp |
index 452e866e4b0ba351ca440c23dbac0a6c124680d7..8a41cc73839af44d50e0c00ffa785e0a497123b2 100644 |
--- a/Source/core/rendering/RenderTableRow.cpp |
+++ b/Source/core/rendering/RenderTableRow.cpp |
@@ -113,9 +113,10 @@ void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) |
if (!last) |
last = lastChild(); |
if (last && last->isAnonymous() && last->isTableCell() && !last->isBeforeOrAfterContent()) { |
- if (beforeChild == last) |
- beforeChild = last->firstChild(); |
- last->addChild(child, beforeChild); |
+ RenderTableCell* lastCell = toRenderTableCell(last); |
+ if (beforeChild == lastCell) |
+ beforeChild = lastCell->firstChild(); |
+ lastCell->addChild(child, beforeChild); |
return; |
} |