Browse Source

Merge pull request #62947 from BastiaanOlij/fix_mesh_instance_free

Rémi Verschelde 3 years ago
parent
commit
7e49c8c30e

+ 1 - 1
servers/rendering/renderer_canvas_render.cpp

@@ -131,6 +131,6 @@ const Rect2 &RendererCanvasRender::Item::get_rect() const {
 
 RendererCanvasRender::Item::CommandMesh::~CommandMesh() {
 	if (mesh_instance.is_valid()) {
-		RSG::mesh_storage->mesh_free(mesh_instance);
+		RSG::mesh_storage->mesh_instance_free(mesh_instance);
 	}
 }

+ 1 - 1
servers/rendering/renderer_scene_cull.cpp

@@ -470,7 +470,7 @@ void RendererSceneCull::_instance_update_mesh_instance(Instance *p_instance) {
 			p_instance->mesh_instance = RSG::mesh_storage->mesh_instance_create(p_instance->base);
 
 		} else {
-			RSG::mesh_storage->mesh_free(p_instance->mesh_instance);
+			RSG::mesh_storage->mesh_instance_free(p_instance->mesh_instance);
 			p_instance->mesh_instance = RID();
 		}