From fb17a1a4a5362eb66cf81195b884067e0b033eb4 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 26 Jun 2020 00:49:43 +0200 Subject: [PATCH] - miscsettings-menu: fix memleak Signed-off-by: Thilo Graf --- src/gui/miscsettings_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index a78625f46..9e5c073b8 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -762,10 +762,10 @@ int CMiscMenue::showMiscSettingsSelectWeatherLocation() m->enableSaveScreen(); res = m->exec(NULL, ""); + delete selector; + if (!m->gotAction()) return res; - - delete selector; } g_settings.weather_location = location[select].value; g_settings.weather_city = std::string(location[select].key);