added check for null
This commit is contained in:
parent
fa8fa3d900
commit
5704196700
1 changed files with 7 additions and 5 deletions
|
@ -59,11 +59,13 @@ public class TransportStopRouteAdapter extends ArrayAdapter<TransportStopRoute>
|
|||
}
|
||||
|
||||
private String getAdjustedRouteRef(String ref) {
|
||||
if (ref.contains(":")) {
|
||||
ref = ref.substring(0, ref.lastIndexOf(':'));
|
||||
}
|
||||
if (ref.length() > 4) {
|
||||
ref = ref.substring(0, 4);
|
||||
if (ref != null) {
|
||||
if (ref.contains(":")) {
|
||||
ref = ref.substring(0, ref.lastIndexOf(':'));
|
||||
}
|
||||
if (ref.length() > 4) {
|
||||
ref = ref.substring(0, 4);
|
||||
}
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue