UI: Prevent recursion in theme dependencies

This commit is contained in:
derrod
2024-06-11 18:25:40 -04:00
committed by Ryan Foster
parent cfd692ca15
commit 21adf0930f
+10
View File
@@ -485,6 +485,16 @@ void OBSApp::FindThemes()
break;
}
if (parent->id == theme.id ||
theme.dependencies.contains(parent->id)) {
blog(LOG_ERROR,
R"(Dependency chain of "%s" ("%s") contains recursion!)",
QT_TO_UTF8(theme.id),
QT_TO_UTF8(parent->id));
invalid.insert(theme.id);
break;
}
/* Mark this theme as a variant of first parent that is a base theme. */
if (!theme.isBaseTheme && parent->isBaseTheme &&
theme.parent.isEmpty())