UI: Fix theme leak
This fixes leaks when loading and switching themes. Signed-off-by: pkv <pkv@obsproject.com>master
parent
405ee4255b
commit
3191c73e16
|
@ -1205,8 +1205,8 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
|||
path = GetTheme(name, path);
|
||||
if (path.empty())
|
||||
return false;
|
||||
|
||||
themeMeta = ParseThemeMeta(path.c_str());
|
||||
unique_ptr<OBSThemeMeta> themeMeta;
|
||||
themeMeta.reset(ParseThemeMeta(path.c_str()));
|
||||
string parentPath;
|
||||
|
||||
if (themeMeta && !themeMeta->parent.empty()) {
|
||||
|
|
|
@ -80,7 +80,7 @@ class OBSApp : public QApplication {
|
|||
private:
|
||||
std::string locale;
|
||||
std::string theme;
|
||||
OBSThemeMeta *themeMeta = nullptr;
|
||||
|
||||
bool themeDarkMode = true;
|
||||
ConfigFile globalConfig;
|
||||
TextLookup textLookup;
|
||||
|
|
Loading…
Reference in New Issue