Destroy old addons list properly when refreshing it

This commit is contained in:
WobLight
2018-07-26 07:38:25 -07:00
parent 73d0552a2a
commit 4600c475ce
+2
View File
@@ -303,6 +303,8 @@ void Control::scanForAddons()
QObjectList ol; QObjectList ol;
foreach (init_t i, list) foreach (init_t i, list)
ol << new Addon(i.first, i.second); ol << new Addon(i.first, i.second);
foreach (QObject *addon, m_addons)
addon->deleteLater();
setAddons(ol); setAddons(ol);
}); });
} }