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) {