UI: Fix initialization bug when launching without existing profile
SetupNewProfile is used to create new profiles when OBS is already running, which requires resetting program state for the new profile. This function cannot be used to create a new profile as a fallback for either a non-existing profile or for a fresh installation of OBS Studio because by the point this is called from OBSBasic::OBSInit, the runtime modules are not loaded yet and as such no services exist. Activating the new profile without a profile reset fixes this issue as the reset will be done explicitly by OBSBasic::OBSInit later.
This commit is contained in:
parent
77d74dd0da
commit
ca4bc1ad36
1 changed files with 2 additions and 1 deletions
|
|
@ -1889,7 +1889,8 @@ bool OBSBasic::InitBasicConfig()
|
|||
} else if (currentProfile) {
|
||||
ActivateProfile(currentProfile.value());
|
||||
} else {
|
||||
SetupNewProfile(currentProfileName);
|
||||
const OBSProfile &newProfile = CreateProfile(currentProfileName);
|
||||
ActivateProfile(newProfile);
|
||||
}
|
||||
} catch (const std::logic_error &) {
|
||||
OBSErrorBox(NULL, "Failed to open basic.ini: %d", -1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue