1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 17:25:38 +02:00

Bug 328369 - Unexpected runtime error while computing a text hover

This commit is contained in:
Anton Leherbauer 2010-10-22 07:44:44 +00:00
parent 99c76ff666
commit a76a17353c

View file

@ -611,7 +611,7 @@ public class CSourceHover extends AbstractCEditorTextHover {
String[] sourceLines= Strings.convertIntoLines(source);
String firstLine= sourceLines[0];
if (!Character.isWhitespace(firstLine.charAt(0)))
if (firstLine.length() > 0 && !Character.isWhitespace(firstLine.charAt(0)))
sourceLines[0]= ""; //$NON-NLS-1$
Strings.trimIndentation(sourceLines, getTabWidth(), getTabWidth());