summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index 6f575ca1c0..38f8ff8644 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -7101,7 +7101,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
dropDetails = new TableDDDetails();
Element elementOver = drag.getElementOver();
- VScrollTableRow row = Util.findWidget(elementOver, getRowClass());
+ Class<? extends Widget> clazz = getRowClass();
+ VScrollTableRow row = null;
+ if (clazz != null) {
+ row = Util.findWidget(elementOver, clazz);
+ }
if (row != null) {
dropDetails.overkey = row.rowKey;
Element tr = row.getElement();
@@ -7127,7 +7131,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
private Class<? extends Widget> getRowClass() {
// get the row type this way to make dd work in derived
// implementations
- return scrollBody.iterator().next().getClass();
+ Iterator<Widget> iterator = scrollBody.iterator();
+ if (iterator.hasNext()) {
+ return iterator.next().getClass();
+ } else {
+ return null;
+ }
}
@Override