diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 392083974..b4af11f79 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -110,7 +110,10 @@ bool CWeather::GetWeatherDetails() answer.clear(); if (!getUrl(data, answer)) + { + delete reader; return false; + } bool parsedSuccess = reader->parse(answer.c_str(), answer.c_str() + answer.size(), &DataValues, &formattedErrors); delete reader;