Merge pull request #172 from vodie/patch-2

Fix error if voiceHints.list is empty
This commit is contained in:
abrensch 2019-07-20 16:31:01 +02:00 committed by GitHub
commit f829bc6630
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
{