Changeset 2938d318 in vaadin


Ignore:
Timestamp:
Mar 15, 2012 11:42:10 AM (2 years ago)
Author:
Artur Signell <artur@…>
Branches:
master, 7.0, 7.1, 7.2, 7.3
Children:
6704241d
Parents:
92e7ba65
Message:

Avoid ClassCastException if widget has been previously attached to
another layout that used setLayoutData

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java

    rce42589a r2938d318  
    8686 
    8787    public VLayoutSlot getSlotForChild(Widget widget) { 
    88         return (VLayoutSlot) widget.getLayoutData(); 
     88        Object o = widget.getLayoutData(); 
     89        if (o instanceof VLayoutSlot) { 
     90            return (VLayoutSlot) o; 
     91        } 
     92 
     93        return null; 
    8994    } 
    9095 
Note: See TracChangeset for help on using the changeset viewer.