diff options
Diffstat (limited to 'servers/visual/visual_server_raster.cpp')
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index eaa02df516..2417c02bf8 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -4393,7 +4393,7 @@ void VisualServerRaster::free( RID p_rid ) { VS_CHANGED; - if (rasterizer->is_texture(p_rid) || rasterizer->is_material(p_rid) || rasterizer->is_shader(p_rid)) { + if (rasterizer->is_texture(p_rid) || rasterizer->is_material(p_rid) || rasterizer->is_shader(p_rid) || rasterizer->is_environment(p_rid)) { rasterizer->free(p_rid); } else if (rasterizer->is_skeleton(p_rid)) { @@ -4410,7 +4410,7 @@ void VisualServerRaster::free( RID p_rid ) { } rasterizer->free(p_rid); - } else if (rasterizer->is_mesh(p_rid) || rasterizer->is_multimesh(p_rid) || rasterizer->is_light(p_rid) || rasterizer->is_particles(p_rid) ) { + } else if (rasterizer->is_mesh(p_rid) || rasterizer->is_multimesh(p_rid) || rasterizer->is_light(p_rid) || rasterizer->is_particles(p_rid) || rasterizer->is_immediate(p_rid)) { //delete the resource _free_attached_instances(p_rid); @@ -7488,6 +7488,10 @@ void VisualServerRaster::finish() { free(default_cursor_texture); + if (test_cube.is_valid()) + free(test_cube); + + _free_internal_rids(); _clean_up_owner( &room_owner,"Room" ); _clean_up_owner( &portal_owner,"Portal" ); @@ -7505,7 +7509,7 @@ void VisualServerRaster::finish() { octree_allocator.clear(); if (instance_dependency_map.size()) { - print_line("base resources missing "+itos(instance_dependency_map.size())); + print_line("Base resources missing amount: "+itos(instance_dependency_map.size())); } ERR_FAIL_COND( instance_dependency_map.size() ); } |