commit | 03af4092b5f4e4ade2a0b846cc7d42df6bdaeafd | [log] [tgz] |
---|---|---|
author | Jinseong Jeon <jsjeon@google.com> | Tue Sep 26 00:32:11 2017 -0700 |
committer | Jinseong Jeon <jsjeon@google.com> | Tue Sep 26 00:32:11 2017 -0700 |
tree | ace991a7339a3627b79c83566701684bb8c9af54 | |
parent | 68fbbc8565f72da30fa100eec07d3c55a3519918 [diff] |
Fix NPE in SourceFileRewriter: code could be removed entirely. Bug: 36799675 Change-Id: I3ffa954391fee8c5cf48144198d8861191afa5a5
diff --git a/src/main/java/com/android/tools/r8/naming/SourceFileRewriter.java b/src/main/java/com/android/tools/r8/naming/SourceFileRewriter.java index 5ab50fc..8745ca5 100644 --- a/src/main/java/com/android/tools/r8/naming/SourceFileRewriter.java +++ b/src/main/java/com/android/tools/r8/naming/SourceFileRewriter.java
@@ -48,7 +48,7 @@ } Code code = encodedMethod.getCode(); // Other kinds of {@link Code} do not have debug_info_item. - if (!code.isDexCode()) { + if (code == null || !code.isDexCode()) { return; } if (code.asDexCode().getDebugInfo() == null) {