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);
|
path = GetTheme(name, path);
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
return false;
|
return false;
|
||||||
|
unique_ptr<OBSThemeMeta> themeMeta;
|
||||||
themeMeta = ParseThemeMeta(path.c_str());
|
themeMeta.reset(ParseThemeMeta(path.c_str()));
|
||||||
string parentPath;
|
string parentPath;
|
||||||
|
|
||||||
if (themeMeta && !themeMeta->parent.empty()) {
|
if (themeMeta && !themeMeta->parent.empty()) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ class OBSApp : public QApplication {
|
||||||
private:
|
private:
|
||||||
std::string locale;
|
std::string locale;
|
||||||
std::string theme;
|
std::string theme;
|
||||||
OBSThemeMeta *themeMeta = nullptr;
|
|
||||||
bool themeDarkMode = true;
|
bool themeDarkMode = true;
|
||||||
ConfigFile globalConfig;
|
ConfigFile globalConfig;
|
||||||
TextLookup textLookup;
|
TextLookup textLookup;
|
||||||
|
|
Loading…
Reference in New Issue