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:
Rodrigo Damazio
2010-08-31 17:31:54 -03:00
parent f605d6fca5
commit 3a8daadd92
@@ -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