Merge pull request #57319 from IgorKordiukiewicz/sprite3d-error-message

This commit is contained in:
Rémi Verschelde 2022-02-12 10:22:40 +01:00 committed by GitHub
commit 93710edb60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2215,7 +2215,9 @@ BaseMaterial3D::EmissionOperator BaseMaterial3D::get_emission_operator() const {
RID BaseMaterial3D::get_shader_rid() const {
MutexLock lock(material_mutex);
((BaseMaterial3D *)this)->_update_shader();
if (element.in_list()) { // _is_shader_dirty() would create anoder mutex lock
((BaseMaterial3D *)this)->_update_shader();
}
ERR_FAIL_COND_V(!shader_map.has(current_key), RID());
return shader_map[current_key].shader;
}