Widget itemWidget = item.getComponent();
if (tabContent != null) {
- if (tabContent != itemWidget) {
+ if (tabContent.getWidget() != itemWidget) {
/*
* This is not the same widget as before, find out if it has
* been moved
@Override
protected ComponentConnector getTab(int index) {
if (index < getWidgetCount()) {
- Widget w = getStackItem(index);
- return ConnectorMap.get(client).getConnector(w);
+ StackItem stackItem = getStackItem(index);
+ if (stackItem == null) {
+ return null;
+ }
+ Widget w = stackItem.getChildWidget();
+ if (w != null) {
+ return ConnectorMap.get(client).getConnector(w);
+ }
}
return null;