Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-02-17 00:37:27 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-02-17 01:29:06 +0300
commitc9c4802c1c26d1125d9bb41ff9187b61e167cc42 (patch)
tree810289098103d3323ef1e3fd400f768500921792 /intern/opencolorio
parentba79b8013f1f1f47b7d3db3f0a1d82826c607281 (diff)
Fix T85671: color management crash with Medium Contrast look
Diffstat (limited to 'intern/opencolorio')
-rw-r--r--intern/opencolorio/ocio_impl.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/intern/opencolorio/ocio_impl.cc b/intern/opencolorio/ocio_impl.cc
index 69a8d8b17af..c4d7a0c4fe9 100644
--- a/intern/opencolorio/ocio_impl.cc
+++ b/intern/opencolorio/ocio_impl.cc
@@ -682,19 +682,25 @@ 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);
- LookTransformRcPtr lt = LookTransform::Create();
- lt->setSrc(input);
- lt->setDst(look_output);
- lt->setLooks(look);
- group->appendTransform(lt);
+ if (look_output != nullptr && look_output[0] != 0) {
+ LookTransformRcPtr lt = LookTransform::Create();
+ lt->setSrc(input);
+ lt->setDst(look_output);
+ lt->setLooks(look);
+ group->appendTransform(lt);
- /* Make further transforms aware of the color space change. */
- input = look_output;
+ /* 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. */