mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-29 19:22:36 +08:00
UI: Prevent recursion in theme dependencies
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user