aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/java.js')
-rw-r--r--lib/compilers/java.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compilers/java.js b/lib/compilers/java.js
index a6aa48a78..1a7c22672 100644
--- a/lib/compilers/java.js
+++ b/lib/compilers/java.js
@@ -254,7 +254,9 @@ export class JavaCompiler extends BaseCompiler {
const sourceLine = Number.parseInt(sourceLineS);
currentSourceLine = sourceLine;
- method.instructions[currentInstr].sourceLine = currentSourceLine;
+ if (method.instructions[currentInstr]) {
+ method.instructions[currentInstr].sourceLine = currentSourceLine;
+ }
if (typeof method.startLine === 'undefined') {
method.startLine = sourceLine;