1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Removed an ArrayIndexOutOfBoundsException.

This commit is contained in:
John Camelon 2005-01-31 02:00:09 +00:00
parent 958d78914a
commit 9ce0f31118

View file

@ -183,7 +183,7 @@ public class CSourceHover extends AbstractCEditorTextHover implements ITextHover
searchEngine.search(CUIPlugin.getWorkspace(), orPattern, scope, searchResultCollector, true);
Set set = searchResultCollector.getSearchResults();
if (set != null) {
if (set != null && set.size() > 0 ) {
IMatch[] matches = new IMatch[set.size()];
set.toArray(matches);
IResource resource = matches[0].getResource();