Skip to content

Commit 8b43bf5

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Fix crash when tokenizer files are not found (#4266)
Summary: Return an array with size 0, to allow getting array length in code below. Pull Request resolved: #4266 Reviewed By: cccclai Differential Revision: D59764473 Pulled By: kirklandsign fbshipit-source-id: f00eac32879c31a983156c4651714ccf1e1ec280
1 parent 9a4823b commit 8b43bf5

File tree

1 file changed

+1
-1
lines changed
  • examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo

1 file changed

+1
-1
lines changed

examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static String[] listLocalFile(String path, String suffix) {
6464
}
6565
return result;
6666
}
67-
return null;
67+
return new String[0];
6868
}
6969

7070
private void setLocalModel(String modelPath, String tokenizerPath) {

0 commit comments

Comments
 (0)