Fix #139950: OpenColorIO crash running Blender from path with $
As with the previous fix for #119560, this does not address the problem in OpenColorIO itself but at least catches the exception to avoid crashing. Which might have also happened with invalid OpenColorIO configurations. Pull Request: https://projects.blender.org/blender/blender/pulls/140145
This commit is contained in:
committed by
Brecht Van Lommel
parent
697d13bbfc
commit
02c1e959cf
@@ -56,8 +56,16 @@ OCIO_NAMESPACE::ConstProcessorRcPtr create_ocio_display_processor(
|
||||
/* Add look transform. */
|
||||
bool use_look = (display_parameters.look != nullptr && display_parameters.look[0] != '\0');
|
||||
if (use_look) {
|
||||
const char *look_output = LookTransform::GetLooksResultColorSpace(
|
||||
ocio_config, ocio_config->getCurrentContext(), display_parameters.look.c_str());
|
||||
const char *look_output = nullptr;
|
||||
|
||||
try {
|
||||
look_output = LookTransform::GetLooksResultColorSpace(
|
||||
ocio_config, ocio_config->getCurrentContext(), display_parameters.look.c_str());
|
||||
}
|
||||
catch (Exception &exception) {
|
||||
report_exception(exception);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (look_output != nullptr && look_output[0] != 0) {
|
||||
LookTransformRcPtr lt = LookTransform::Create();
|
||||
|
||||
Reference in New Issue
Block a user