1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix for : NPE in CTagEntry

This commit is contained in:
Bogdan Gheorghe 2005-07-12 13:56:25 +00:00
parent ef2c62d0bf
commit 6d9f16002a

View file

@ -216,7 +216,10 @@ class CTagEntry{
private char[][] getFunctionSignature() {
String signature = (String) tagExtensionField.get(CTagsConsoleParser.SIGNATURE);
if (signature.equals("()")){ //$NON-NLS-1$
//Under Exuberant CTags 5.5.4, in the C parsing mode: a function that doesn't take any parameters
//will have no signature string (resulting in null)
if (signature == null ||
signature.equals("()")){ //$NON-NLS-1$
char[][] voidSignature = new char[1][];
voidSignature[0] = "void".toCharArray(); //$NON-NLS-1$
return voidSignature;