mirror of
https://github.com/etesync/android
synced 2025-05-08 09:58:51 +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) {
|
private String getLine(String content, String prefix) {
|
||||||
|
if (content == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
int start = content.indexOf(prefix);
|
int start = content.indexOf(prefix);
|
||||||
if (start >= 0) {
|
if (start >= 0) {
|
||||||
int end = content.indexOf("\n", start);
|
int end = content.indexOf("\n", start);
|
||||||
|
Loading…
Reference in New Issue
Block a user