fix: initialize default OCIO config on first use

ColorManager::Init() (run by every Project construction) dereferenced
GetDefaultConfig() unconditionally. Any Project created before
SetUpDefaultConfig() crashed inside OCIO getCanonicalName on a null
config — the Windows CI SEGFAULT, where the suite order runs a
Project-creating test first. Reproduced locally by running
MainWindowLayoutInfo.AccessorsStoreAndRetrieve as the first suite.
This commit is contained in:
2026-07-17 18:28:38 +08:00
parent 9ca2b0e716
commit ff95ffa216
@@ -68,6 +68,13 @@ QString ColorManager::GetConfigFilename() const
OCIO::ConstConfigRcPtr ColorManager::GetDefaultConfig()
{
// Set up on first use: Project construction calls ColorManager::Init()
// unconditionally, so without this any Project created before
// SetUpDefaultConfig() crashed dereferencing a null config.
if (!default_config_) {
SetUpDefaultConfig();
}
return default_config_;
}