Merge pull request #68779 from dzil123/fix_renderdummy_mesh_surface_overflow
RendererDummy - Fix buffer overflow due to stale mesh_get_surface
This commit is contained in:
commit
e1ead0fbd1
2 changed files with 8 additions and 1 deletions
|
@ -56,3 +56,10 @@ void MeshStorage::mesh_free(RID p_rid) {
|
|||
|
||||
mesh_owner.free(p_rid);
|
||||
}
|
||||
|
||||
void MeshStorage::mesh_clear(RID p_mesh) {
|
||||
DummyMesh *m = mesh_owner.get_or_null(p_mesh);
|
||||
ERR_FAIL_COND(!m);
|
||||
|
||||
m->surfaces.clear();
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) override { return AABB(); }
|
||||
virtual void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) override {}
|
||||
virtual void mesh_clear(RID p_mesh) override {}
|
||||
virtual void mesh_clear(RID p_mesh) override;
|
||||
|
||||
/* MESH INSTANCE */
|
||||
|
||||
|
|
Loading…
Reference in a new issue