mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add safety-checks before some servers free()
This commit is contained in:
@@ -744,8 +744,10 @@ Camera3D::Camera3D() {
|
||||
}
|
||||
|
||||
Camera3D::~Camera3D() {
|
||||
ERR_FAIL_NULL(RenderingServer::get_singleton());
|
||||
RenderingServer::get_singleton()->free(camera);
|
||||
if (pyramid_shape.is_valid()) {
|
||||
ERR_FAIL_NULL(PhysicsServer3D::get_singleton());
|
||||
PhysicsServer3D::get_singleton()->free(pyramid_shape);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user