forked from upstream-mirrors/OpenTracks
Fixing NPE seen on developer console.
Apparently this happens when the activity was previously showing the chart settings dialog, and was paused then restarted - in that case we'll just keep the default chart settings.
This commit is contained in:
@@ -66,6 +66,10 @@ public class ChartSettingsDialog extends Dialog {
|
||||
}
|
||||
|
||||
public void setup(ChartActivity chart) {
|
||||
if (chart == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
RadioGroup rd = (RadioGroup) findViewById(R.id.chart_settings_x);
|
||||
rd.check(chart.getMode() == Mode.BY_DISTANCE
|
||||
? R.id.chart_settings_by_distance
|
||||
|
||||
Reference in New Issue
Block a user