Cleanup: Cycles: Avoid potentially dangling XYZ-to-scene-linear reference

It's not really possible in practice for OpenColorIO configs to switch
mid render, but better not to return a reference to something that is
mutex protected.

This issue was introduced in 5d2b8f8a52.

Pull Request: https://projects.blender.org/blender/blender/pulls/159666
This commit is contained in:
Brecht Van Lommel 2026-06-05 23:04:05 +02:00
parent 9500a849fa
commit ec0d32541e
2 changed files with 2 additions and 2 deletions

View file

@ -791,7 +791,7 @@ Transform ColorSpaceManager::get_xyz_to_scene_linear_rgb()
return xyz_to_rgb;
}
const std::string &ColorSpaceManager::get_xyz_to_scene_linear_rgb_string()
std::string ColorSpaceManager::get_xyz_to_scene_linear_rgb_string()
{
#ifdef WITH_OCIO
/* Clear the cached hash if the scene linear colorspace changed. */

View file

@ -65,7 +65,7 @@ class ColorSpaceManager {
static Transform get_xyz_to_rec2020();
static Transform get_xyz_to_acescg();
/* Compute unique string for texture cache hashing and metadata. */
static const string &get_xyz_to_scene_linear_rgb_string();
static string get_xyz_to_scene_linear_rgb_string();
/* Determine if scene linear is a common known space. */
static const char *get_scene_linear_interop_id(const bool srgb_encoded = false);