From 5c259e1ee08c65a89dd4af4a4ee8c12af9547fc8 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Mon, 17 Aug 2015 22:14:22 +0900 Subject: [PATCH] * Fix one more potential `NullPointerException` in `Parser` (issue #30) --- src/main/java/org/bytedeco/javacpp/tools/Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bytedeco/javacpp/tools/Parser.java b/src/main/java/org/bytedeco/javacpp/tools/Parser.java index fd0647f88..4bf861748 100644 --- a/src/main/java/org/bytedeco/javacpp/tools/Parser.java +++ b/src/main/java/org/bytedeco/javacpp/tools/Parser.java @@ -1258,7 +1258,7 @@ boolean function(Context context, DeclarationList declList) throws ParserExcepti for (int n = -2; n < Integer.MAX_VALUE; n++) { decl = new Declaration(); tokens.index = startIndex; - if (type.constructor || type.destructor || type.operator) { + if ((type.constructor || type.destructor || type.operator) && params != null) { type = type(context); params = parameters(context, n / 2, n % 2 != 0); dcl = new Declarator();