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:
@@ -68,6 +68,13 @@ QString ColorManager::GetConfigFilename() const
|
|||||||
|
|
||||||
OCIO::ConstConfigRcPtr ColorManager::GetDefaultConfig()
|
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_;
|
return default_config_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user