diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2022-01-04 13:23:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 13:23:38 +0300 |
commit | b74968c2ca6ae70e074fa44ee368b513a62aa309 (patch) | |
tree | b9c76c302a9174656d7369813b4446975d2fbd59 /servers | |
parent | 2d07789ad1a2a746c00f2b2f05787a2c5ddfed67 (diff) | |
parent | 0e2ef987b18537a729cdbe42f2acd0a396c1abcd (diff) |
Merge pull request #56477 from Chaosus/fix_device_crash
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/shader_language.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 944a6096b2..5d420ba48d 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -7595,7 +7595,10 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct int instance_index = 0; #ifdef DEBUG_ENABLED int uniform_buffer_size = 0; - int max_uniform_buffer_size = RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_UNIFORM_BUFFER_SIZE); + int max_uniform_buffer_size = 0; + if (RenderingDevice::get_singleton()) { + max_uniform_buffer_size = RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_UNIFORM_BUFFER_SIZE); + } #endif // DEBUG_ENABLED ShaderNode::Uniform::Scope uniform_scope = ShaderNode::Uniform::SCOPE_LOCAL; |