Skip to content

Commit 2ea5d37

Browse files
Merge pull request #2532 from KhronosGroup/fix-2530
MSL: Fix crash when using force-native-arrays in some cases.
2 parents 7789fe4 + 28c68ff commit 2ea5d37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spirv_msl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16631,7 +16631,7 @@ string CompilerMSL::type_to_array_glsl(const SPIRType &type, uint32_t variable_i
1663116631
default:
1663216632
if (type_is_array_of_pointers(type) || using_builtin_array())
1663316633
{
16634-
const SPIRVariable *var = variable_id ? &get<SPIRVariable>(variable_id) : nullptr;
16634+
const SPIRVariable *var = variable_id ? maybe_get<SPIRVariable>(variable_id) : nullptr;
1663516635
if (var && (var->storage == StorageClassUniform || var->storage == StorageClassStorageBuffer) &&
1663616636
is_array(get_variable_data_type(*var)))
1663716637
{

0 commit comments

Comments
 (0)