Fix error if voiceHints.list is empty

This commit is contained in:
vodie 2019-07-20 13:43:28 +02:00 committed by GitHub
parent c1f68e99d0
commit dda374073a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -449,7 +449,11 @@ public final class OsmTrack
.append ( " <desc>start</desc>\n <extensions>\n");
float rteTime;
rteTime = voiceHints.list.get(0).getTime();
if(!voiceHints.list.isEmpty()){
rteTime = voiceHints.list.get(0).getTime();
}else{
rteTime = 0;
}
if ( rteTime != lastRteTime ) // add timing only if available
{