diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-09-07 21:31:16 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-09-07 21:31:16 +0800 |
commit | eea02e50a733cdda80fcf74596d4ac045b6edce1 (patch) | |
tree | 32a889304c2d009a8b63c242339851c3f4683451 /servers/rendering/dummy | |
parent | 019253512d75eb5e012772921ace6c092d8f5380 (diff) |
Fix crash when executing `VisualShaderNodeParticleMeshEmitter.set_mesh` with headless Godot
Diffstat (limited to 'servers/rendering/dummy')
-rw-r--r-- | servers/rendering/dummy/storage/mesh_storage.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/dummy/storage/mesh_storage.h b/servers/rendering/dummy/storage/mesh_storage.h index 336049852d..b0914e70e4 100644 --- a/servers/rendering/dummy/storage/mesh_storage.h +++ b/servers/rendering/dummy/storage/mesh_storage.h @@ -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; } |