1
0
Fork 0

Fix crash when executing `VisualShaderNodeParticleMeshEmitter.set_mesh` with headless Godot

This commit is contained in:
Haoyu Qiu 2022-09-07 21:31:16 +08:00
parent 019253512d
commit eea02e50a7
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ public:
virtual RS::SurfaceData mesh_get_surface(RID p_mesh, int p_surface) const override {
DummyMesh *m = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!m, RS::SurfaceData());
ERR_FAIL_INDEX_V(p_surface, m->surfaces.size(), RS::SurfaceData());
RS::SurfaceData s = m->surfaces[p_surface];
return s;
}