aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.js
diff options
context:
space:
mode:
authorpartouf <partouf@gmail.com>2021-04-30 16:03:41 +0000
committerpartouf <partouf@gmail.com>2021-04-30 16:03:41 +0000
commit6bad75e8a64be3858e5d551ecfbe13288bb699dd (patch)
tree0fcbfa2cc9f7d8eae66982a1b1f87878687c274a /lib/compilers/java.js
parenta330cd97f92495ddac6f3282eabfa5bcd0c2981e (diff)
downloadcompiler-explorer-6bad75e8a64be3858e5d551ecfbe13288bb699dd.tar.gz
compiler-explorer-6bad75e8a64be3858e5d551ecfbe13288bb699dd.zip
fix #2623
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;