UI: Fix theme leak

This fixes leaks when loading and switching themes.

Signed-off-by: pkv <pkv@obsproject.com>
master
pkv 2022-08-12 16:08:28 +02:00 committed by Jim
parent 405ee4255b
commit 3191c73e16
2 changed files with 3 additions and 3 deletions

View File

@ -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()) {

View File

@ -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;