2006-05-20  Mitz Pettel  <opendarwin.org@mitzpettel.com>

        Reviewed and landed by ap.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9009
          REGRESSION: ToT crash in WebCore at Zap2it

        Test: fast/table/empty-section-crash.html

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint): Return immediately if the section
        has 0 rows or 0 columns.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index f94f9e1..8728f38 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -829,6 +829,9 @@
     unsigned int totalRows = gridRows;
     unsigned int totalCols = table()->columns.size();
 
+    if (totalRows == 0 || totalCols == 0)
+        return;
+
     tx += m_x;
     ty += m_y;