summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authornikitalita <69168929+nikitalita@users.noreply.github.com>2024-11-09 00:07:33 -0600
committerGitHub <noreply@github.com>2024-11-09 00:07:33 -0600
commit78895c709c61eaff5450aed55744cbf7d2e491e6 (patch)
tree7162d892a5f806003fbe95598b1f63538366aec8 /drivers
parente65a23762b36b564eb94672031f37fdadba72333 (diff)
downloadredot-engine-78895c709c61eaff5450aed55744cbf7d2e491e6.tar.gz
Prevent stack-use-after-scope in rendering_device_driver_metal.mm
Diffstat (limited to 'drivers')
-rw-r--r--drivers/metal/rendering_device_driver_metal.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm
index 4da11ecd21..39ca90d5a3 100644
--- a/drivers/metal/rendering_device_driver_metal.mm
+++ b/drivers/metal/rendering_device_driver_metal.mm
@@ -1978,7 +1978,8 @@ Vector<uint8_t> RenderingDeviceDriverMetal::shader_compile_binary_from_spirv(Vec
ERR_FAIL_COND_V_MSG(compiler.get_entry_points_and_stages().size() != 1, Result(), "Expected a single entry point and stage.");
- EntryPoint &entry_point_stage = compiler.get_entry_points_and_stages().front();
+ SmallVector<EntryPoint> entry_pts_stages = compiler.get_entry_points_and_stages();
+ EntryPoint &entry_point_stage = entry_pts_stages.front();
SPIREntryPoint &entry_point = compiler.get_entry_point(entry_point_stage.name, entry_point_stage.execution_model);
// Process specialization constants.