reportlab/platypus/flowables.py
changeset 2694 dd0ea6474ea0
parent 2662 0a5217162c3f
child 2695 feb999d5dbd1
--- a/reportlab/platypus/flowables.py	Fri Sep 29 19:37:07 2006 +0000
+++ b/reportlab/platypus/flowables.py	Sun Oct 01 22:53:20 2006 +0000
@@ -744,7 +744,10 @@
                 T = I.trailer
                 Hdr = I.header
                 tW, tH = _listWrapOn(T, availWidth, self.canv)
-                tSB = T[0].getSpaceBefore()
+                if len(T):  #trailer may have no content
+                    tSB = T[0].getSpaceBefore()
+                else:
+                    tSB = 0
                 I2W[I] = T,tW,tH,tSB
             else:
                 T,tW,tH,tSB = I2W[I]