diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/collision_object_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/gpu_particles_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/joint_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/light_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/light_occluder_2d.cpp | 3 | ||||
-rw-r--r-- | scene/2d/navigation_agent_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/navigation_link_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/navigation_obstacle_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/navigation_region_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/polygon_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/skeleton_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 4 |
13 files changed, 19 insertions, 0 deletions
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index df75d34e0f..fccaf63319 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -661,5 +661,6 @@ CollisionObject2D::CollisionObject2D() { } CollisionObject2D::~CollisionObject2D() { + ERR_FAIL_NULL(PhysicsServer2D::get_singleton()); PhysicsServer2D::get_singleton()->free(rid); } diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index c6296f4732..68dc85486d 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1507,6 +1507,7 @@ CPUParticles2D::CPUParticles2D() { } CPUParticles2D::~CPUParticles2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(multimesh); RS::get_singleton()->free(mesh); } diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index ccbc080768..95e24028a6 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -688,6 +688,7 @@ GPUParticles2D::GPUParticles2D() { } GPUParticles2D::~GPUParticles2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(particles); RS::get_singleton()->free(mesh); } diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp index 3ec744ff8e..9e12c7aa3b 100644 --- a/scene/2d/joint_2d.cpp +++ b/scene/2d/joint_2d.cpp @@ -246,6 +246,7 @@ Joint2D::Joint2D() { } Joint2D::~Joint2D() { + ERR_FAIL_NULL(PhysicsServer2D::get_singleton()); PhysicsServer2D::get_singleton()->free(joint); } diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 78b5199358..e07393a9c7 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -321,6 +321,7 @@ Light2D::Light2D() { } Light2D::~Light2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RenderingServer::get_singleton()->free(canvas_light); } diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 67e82140e4..e7997c6eff 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -148,6 +148,7 @@ OccluderPolygon2D::OccluderPolygon2D() { } OccluderPolygon2D::~OccluderPolygon2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(occ_polygon); } @@ -291,5 +292,7 @@ LightOccluder2D::LightOccluder2D() { } LightOccluder2D::~LightOccluder2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); + RS::get_singleton()->free(occluder); } diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 62afe0d89b..4455142a6c 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -197,6 +197,7 @@ NavigationAgent2D::NavigationAgent2D() { } NavigationAgent2D::~NavigationAgent2D() { + ERR_FAIL_NULL(NavigationServer2D::get_singleton()); NavigationServer2D::get_singleton()->free(agent); agent = RID(); // Pointless } diff --git a/scene/2d/navigation_link_2d.cpp b/scene/2d/navigation_link_2d.cpp index d639e1cc89..34005dbd9e 100644 --- a/scene/2d/navigation_link_2d.cpp +++ b/scene/2d/navigation_link_2d.cpp @@ -285,6 +285,7 @@ NavigationLink2D::NavigationLink2D() { } NavigationLink2D::~NavigationLink2D() { + ERR_FAIL_NULL(NavigationServer2D::get_singleton()); NavigationServer2D::get_singleton()->free(link); link = RID(); } diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index cbec4db4c5..4d9d46fb06 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -116,6 +116,7 @@ NavigationObstacle2D::NavigationObstacle2D() { } NavigationObstacle2D::~NavigationObstacle2D() { + ERR_FAIL_NULL(NavigationServer2D::get_singleton()); NavigationServer2D::get_singleton()->free(agent); agent = RID(); // Pointless } diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 675ef7c780..78c65256e8 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -343,6 +343,7 @@ NavigationRegion2D::NavigationRegion2D() { } NavigationRegion2D::~NavigationRegion2D() { + ERR_FAIL_NULL(NavigationServer2D::get_singleton()); NavigationServer2D::get_singleton()->free(region); #ifdef DEBUG_ENABLED diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index e41664b006..5b00a3a2dc 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -664,6 +664,7 @@ Polygon2D::Polygon2D() { Polygon2D::~Polygon2D() { // This will free the internally-allocated mesh instance, if allocated. + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->canvas_item_attach_skeleton(get_canvas_item(), RID()); RS::get_singleton()->free(mesh); } diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index 62787d4488..fa0358fabc 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -529,6 +529,7 @@ Bone2D::Bone2D() { Bone2D::~Bone2D() { #ifdef TOOLS_ENABLED if (!editor_gizmo_rid.is_null()) { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RenderingServer::get_singleton()->free(editor_gizmo_rid); } #endif // TOOLS_ENABLED @@ -803,5 +804,6 @@ Skeleton2D::Skeleton2D() { } Skeleton2D::~Skeleton2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(skeleton); } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 3136752a2e..f52dbd1c53 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1108,6 +1108,7 @@ void TileMap::_rendering_update_layer(int p_layer) { void TileMap::_rendering_cleanup_layer(int p_layer) { ERR_FAIL_INDEX(p_layer, (int)layers.size()); + ERR_FAIL_NULL(RenderingServer::get_singleton()); RenderingServer *rs = RenderingServer::get_singleton(); if (layers[p_layer].canvas_item.is_valid()) { rs->free(layers[p_layer].canvas_item); @@ -1280,6 +1281,7 @@ void TileMap::_rendering_create_quadrant(TileMapQuadrant *p_quadrant) { } void TileMap::_rendering_cleanup_quadrant(TileMapQuadrant *p_quadrant) { + ERR_FAIL_NULL(RenderingServer::get_singleton()); // Free the canvas items. for (const RID &ci : p_quadrant->canvas_items) { RenderingServer::get_singleton()->free(ci); @@ -1596,6 +1598,7 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r void TileMap::_physics_cleanup_quadrant(TileMapQuadrant *p_quadrant) { // Remove a quadrant. + ERR_FAIL_NULL(PhysicsServer2D::get_singleton()); for (RID body : p_quadrant->bodies) { bodies_coords.erase(body); PhysicsServer2D::get_singleton()->free(body); @@ -1754,6 +1757,7 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List void TileMap::_navigation_cleanup_quadrant(TileMapQuadrant *p_quadrant) { // Clear navigation shapes in the quadrant. + ERR_FAIL_NULL(NavigationServer2D::get_singleton()); for (const KeyValue<Vector2i, Vector<RID>> &E : p_quadrant->navigation_regions) { for (int i = 0; i < E.value.size(); i++) { RID region = E.value[i]; |