Skip to content

Commit

Permalink
Fix another crash
Browse files Browse the repository at this point in the history
  • Loading branch information
vshcherb committed Dec 28, 2023
1 parent 11d8177 commit 7a362ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OsmAnd/src/net/osmand/plus/track/data/TrackFolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ public List<TrackItem> getFlattenedTrackItems() {
@NonNull
public List<TrackFolder> getFlattenedSubFolders() {
if (flattenedSubFolders == null) {
flattenedSubFolders = getSubFolders();
for (TrackFolder folder : getSubFolders()) {
List<TrackFolder> flattenedSubFolders = new ArrayList<>();
List<TrackFolder> sub = getSubFolders();
flattenedSubFolders.addAll(sub);
for (TrackFolder folder : sub) {
flattenedSubFolders.addAll(folder.getFlattenedSubFolders());
}
this.flattenedSubFolders = flattenedSubFolders;

}
return flattenedSubFolders;
}
Expand Down

0 comments on commit 7a362ff

Please sign in to comment.