Bug 239945 [Coolbar] ArrayIndexOutOfBoundsException -1 in CoolBarManager.update
bundles/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
}
        
        if (contextMenuManager != null) {
            contextMenuManager.dispose();
            contextMenuManager = null;
        }
    }
    /**
     * Disposes the given cool item.
     * 
     * @param item
     *            the cool item to dispose
     */
    private void dispose(CoolItem item) {
        if ((item != null) && !item.isDisposed()) {
            item.setData(null);
            Control control = item.getControl();
            
            
            
            if ((control != null) && !control.isDisposed()) {
                item.setControl(null);
            }
            item.dispose();
        }
    }
    /**
     * Finds the cool item associated with the given contribution item.
     * 
     * @param item