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:
parent
d0bfe6dad4
commit
be108389c5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user