Check multimesh before uniform set creation
This commit is contained in:
parent
10209e31eb
commit
61df370810
@ -614,6 +614,9 @@ public:
|
||||
|
||||
_FORCE_INLINE_ RID multimesh_get_3d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
|
||||
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
||||
if (multimesh == nullptr) {
|
||||
return RID();
|
||||
}
|
||||
if (!multimesh->uniform_set_3d.is_valid()) {
|
||||
if (!multimesh->buffer.is_valid()) {
|
||||
return RID();
|
||||
@ -632,6 +635,9 @@ public:
|
||||
|
||||
_FORCE_INLINE_ RID multimesh_get_2d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
|
||||
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
||||
if (multimesh == nullptr) {
|
||||
return RID();
|
||||
}
|
||||
if (!multimesh->uniform_set_2d.is_valid()) {
|
||||
if (!multimesh->buffer.is_valid()) {
|
||||
return RID();
|
||||
|
Loading…
Reference in New Issue
Block a user