Commit b76593d1 authored by Nicolas Fella's avatar Nicolas Fella Committed by Han Young
Browse files

Prevent crash when forecast is empty

parent 0b795185
...@@ -245,7 +245,7 @@ void WeatherLocation::updateSeries() ...@@ -245,7 +245,7 @@ void WeatherLocation::updateSeries()
m_minTempLimit = minTemp - 5; m_minTempLimit = minTemp - 5;
m_series->replace(m_vector); m_series->replace(m_vector);
if (m_axisX) { if (m_axisX && !m_forecast.dailyWeatherForecast().empty()) {
m_axisX->setRange(m_forecast.dailyWeatherForecast().front().date().startOfDay(), m_forecast.dailyWeatherForecast().back().date().startOfDay()); m_axisX->setRange(m_forecast.dailyWeatherForecast().front().date().startOfDay(), m_forecast.dailyWeatherForecast().back().date().startOfDay());
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment