mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-02-19 23:46:57 -05:00
UI: Fix themeDir buffer being resized incorrectly
c677bac875 changed the order here, but
this also resulted in the string having whatever size was necessary for
the install data path, rather than being large enough to fit a userdata
path. To fix this, move the resize operaetion *after* the buit-in
themes are searched, and also bump it to 1024 just to be sure.
This resulted in a crash due to a bug in os_get_path_internal() which
will need to be fixed separately.
This commit is contained in:
@@ -417,7 +417,6 @@ static vector<OBSThemeVariable> ParseThemeVariables(const char *themeData)
|
||||
void OBSApp::FindThemes()
|
||||
{
|
||||
string themeDir;
|
||||
themeDir.resize(512);
|
||||
|
||||
QStringList filters;
|
||||
filters << "*.obt" // OBS Base Theme
|
||||
@@ -435,6 +434,7 @@ void OBSApp::FindThemes()
|
||||
delete theme;
|
||||
}
|
||||
|
||||
themeDir.resize(1024);
|
||||
if (GetConfigPath(themeDir.data(), themeDir.capacity(),
|
||||
"obs-studio/themes/") > 0) {
|
||||
QDirIterator it(QT_UTF8(themeDir.c_str()), filters,
|
||||
|
||||
Reference in New Issue
Block a user