diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 74966d6b26..5e5ae8a259 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -5307,9 +5307,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets, for (Widget row : renderedRows) { if (!(row instanceof VScrollTableGeneratedRow)) { TableRowElement tr = row.getElement().cast(); - Element wrapperdiv = tr.getCells().getItem(columnIndex) - .getFirstChildElement().cast(); - return wrapperdiv.getOffsetWidth(); + // Spanned rows might cause an NPE. + if (columnIndex < tr.getChildCount()) { + Element wrapperdiv = tr.getCells() + .getItem(columnIndex) + .getFirstChildElement().cast(); + return wrapperdiv.getOffsetWidth(); + } } } return 0; |