summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan
diff options
context:
space:
mode:
authorLyuma <xn.lyuma@gmail.com>2023-10-01 23:59:24 -0700
committerLyuma <xn.lyuma@gmail.com>2023-10-02 06:12:01 -0700
commit1d34033143fcc4b520b7b2296f1847a92a0e41de (patch)
treed479436380112709678ce6eaf5de475756ca683b /drivers/vulkan
parent0ca8542329888e8dccba89d59d3b728090c29991 (diff)
downloadredot-engine-1d34033143fcc4b520b7b2296f1847a92a0e41de.tar.gz
Workaround crash due to null shader when running XR project with --xr-mode off
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 11321b2121..e553b2b522 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -5054,6 +5054,7 @@ RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_
}
Shader *shader = shader_owner.get_or_null(id);
+ ERR_FAIL_NULL_V(shader, RID());
shader->vertex_input_mask = vertex_input_mask;
shader->fragment_output_mask = fragment_output_mask;