Fix #144814: Cycles OSL crash accessing geom:name string attribute

This should be a ustring hash now, not a ustring.

Pull Request: https://projects.blender.org/blender/blender/pulls/144881
This commit is contained in:
Brecht Van Lommel
2025-08-20 21:00:12 +02:00
committed by Brecht Van Lommel
parent abe1b9d895
commit 1d9bd460fc

View File

@@ -534,12 +534,12 @@ ccl_device_template_spec bool set_attribute(ustring str,
if (type.basetype == TypeDesc::STRING && type.aggregate == TypeDesc::SCALAR &&
type.arraylen == 0)
{
ustring *sval = (ustring *)val;
OSLUStringHash *sval = (OSLUStringHash *)val;
sval[0] = str;
if (derivatives) {
sval[1] = OSLRenderServices::u_empty;
sval[2] = OSLRenderServices::u_empty;
sval[1] = OSLUStringHash();
sval[2] = OSLUStringHash();
}
return true;