Skip to content

Commit 274b730

Browse files
exception handling
1 parent 9f0427d commit 274b730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/anthonisen/felix/astParsing/visitors/CastInsertionVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public Visitable visit(MethodCallExpr n, Void arg) {
2828
NameExpr expr = (NameExpr) scope.get();
2929
if (expr.getNameAsString().equals(ref.first)) {
3030
MethodData data = methodMap.get(n.getNameAsString());
31-
if (data.shouldCast()) {
31+
if (data != null && data.shouldCast()) {
3232
String castString = data.castString().replace("*", ref.second);
3333
expr.setName("(" + castString + ") " + ref.first); // TODO use the correct methods to make a
3434
// castexpr

0 commit comments

Comments
 (0)