commit | a8be1b4c803efb16a18a232a0e6bc355f886c15c | [log] [tgz] |
---|---|---|
author | Ben Gruver <bgruv@google.com> | Mon Sep 24 18:22:02 2012 -0700 |
committer | Ben Gruver <bgruv@google.com> | Mon Sep 24 18:22:02 2012 -0700 |
tree | afd12fcf9320ebdd0011659ed583da68bb527448 | |
parent | a3dce1f48ce565387783c1c916d8bf73ec1ac660 [diff] |
Fix NullPointerException if source file is not set in lexer
diff --git a/smali/src/main/jflex/smaliLexer.flex b/smali/src/main/jflex/smaliLexer.flex index 2330368..dba2663 100644 --- a/smali/src/main/jflex/smaliLexer.flex +++ b/smali/src/main/jflex/smaliLexer.flex
@@ -74,6 +74,9 @@ } public String getSourceName() { + if (sourceFile == null) { + return ""; + } try { return PathUtil.getRelativeFile(new File("."), sourceFile).getPath(); } catch (IOException ex) {