diff options
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java index 34362c9c2b..1a36ba9c93 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java @@ -209,8 +209,10 @@ public class VAbstractOrderedLayout extends FlowPanel { * @return */ public void removeWidget(Widget widget) { - Slot slot = widgetToSlot.get(widget); - removeSlot(slot); + Slot slot = widgetToSlot.remove(widget); + if (slot != null) { + removeSlot(slot); + } } /** @@ -226,7 +228,6 @@ public class VAbstractOrderedLayout extends FlowPanel { */ protected void removeSlot(Slot slot) { remove(slot); - widgetToSlot.remove(slot.getWidget()); } /** |