From a93f301c428c80be1d9e128cc7218c5fd4e91c76 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 26 Jun 2020 00:49:43 +0200 Subject: [PATCH] miscsettings-menu: fix memleak Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a93b307c15b19fb96903c49a8bb22abac96110a4 Author: vanhofen Date: 2020-06-26 (Fri, 26 Jun 2020) Origin message was: ------------------ - miscsettings-menu: fix memleak --- 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 f666dbeaa..eda816b27 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -759,10 +759,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);