forked from bartvdbraak/blender
Fix T85671: color management crash with Medium Contrast look
This commit is contained in:
parent
ba79b8013f
commit
c9c4802c1c
@ -682,11 +682,12 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::createDisplayProcessor(OCIO_ConstConfigRcPtr
|
||||
}
|
||||
|
||||
/* Add look transform. */
|
||||
const bool use_look = (strlen(look) != 0);
|
||||
bool use_look = (look != nullptr && look[0] != 0);
|
||||
if (use_look) {
|
||||
const char *look_output = LookTransform::GetLooksResultColorSpace(
|
||||
config, config->getCurrentContext(), look);
|
||||
|
||||
if (look_output != nullptr && look_output[0] != 0) {
|
||||
LookTransformRcPtr lt = LookTransform::Create();
|
||||
lt->setSrc(input);
|
||||
lt->setDst(look_output);
|
||||
@ -696,6 +697,11 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::createDisplayProcessor(OCIO_ConstConfigRcPtr
|
||||
/* Make further transforms aware of the color space change. */
|
||||
input = look_output;
|
||||
}
|
||||
else {
|
||||
/* For empty looks, no output color space is returned. */
|
||||
use_look = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add view and display transform. */
|
||||
DisplayViewTransformRcPtr dvt = DisplayViewTransform::Create();
|
||||
|
Loading…
Reference in New Issue
Block a user