From a414a7979cbf005fb74e4f44bcd26bc20b96a812 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 10 Feb 2020 17:08:25 +0300 Subject: [PATCH] Fix NPE --- .../main/java/org/teavm/model/transformation/ClassPatch.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/org/teavm/model/transformation/ClassPatch.java b/core/src/main/java/org/teavm/model/transformation/ClassPatch.java index 32aea9e44..15b106bc1 100644 --- a/core/src/main/java/org/teavm/model/transformation/ClassPatch.java +++ b/core/src/main/java/org/teavm/model/transformation/ClassPatch.java @@ -42,6 +42,9 @@ public class ClassPatch implements ClassHolderTransformer { } private void patchProgram(Program program) { + if (program == null) { + return; + } for (int i = 0; i < program.basicBlockCount(); ++i) { BasicBlock block = program.basicBlockAt(i); for (Instruction instruction : block) {