Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Exception for null value
Browse files Browse the repository at this point in the history
  • Loading branch information
yashvadaria committed Nov 20, 2023
1 parent 64cff1f commit 6cb2ea5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ public ViewHolder(View view) {

}
public void setElevation(AggregatedStatistics.AggregatedStatistic aggregatedStatistic) {
if(aggregatedStatistic.getTrackStatistics().getTotalAltitudeGain()==null)
elevationGain.setText("0.0");
else
elevationGain.setText(aggregatedStatistic.getTrackStatistics().getTotalAltitudeGain().toString());
System.out.println();
}
public void setSpeed(AggregatedStatistics.AggregatedStatistic aggregatedStatistic) {
setCommonValues(aggregatedStatistic);
Expand Down

0 comments on commit 6cb2ea5

Please sign in to comment.