1
0
mirror of https://github.com/etesync/android synced 2024-11-16 04:49:06 +00:00

Journal viewer: verify journal entry content is not null before searching it.

This actually happened for a user, which is weird, because entries should never be null,
but I guess it is a possible scenario.
This commit is contained in:
Tom Hacohen 2017-04-25 11:01:33 +01:00
parent d0bfe6dad4
commit be108389c5

View File

@ -92,6 +92,10 @@ public class ListEntriesFragment extends ListFragment implements AdapterView.OnI
}
private String getLine(String content, String prefix) {
if (content == null) {
return null;
}
int start = content.indexOf(prefix);
if (start >= 0) {
int end = content.indexOf("\n", start);