mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-12 17:08:48 +00:00
AbstractHafasMobileProvider: Fix exception if there is no ticket list in trip fare.
This commit is contained in:
parent
3766972f7e
commit
dabbfc878b
1 changed files with 1 additions and 1 deletions
|
@ -511,7 +511,7 @@ public abstract class AbstractHafasMobileProvider extends AbstractHafasProvider
|
|||
for (int iFare = 0; iFare < fareList.length(); iFare++) {
|
||||
final JSONObject jsonFare = fareList.getJSONObject(iFare);
|
||||
final String name = jsonFare.getString("name");
|
||||
final JSONArray ticketList = jsonFare.getJSONArray("ticketL");
|
||||
final JSONArray ticketList = jsonFare.optJSONArray("ticketL");
|
||||
if (ticketList != null) {
|
||||
for (int iTicket = 0; iTicket < ticketList.length(); iTicket++) {
|
||||
final JSONObject jsonTicket = ticketList.getJSONObject(iTicket);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue