summaryrefslogtreecommitdiffstats
path: root/scene/3d/path_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/path_3d.cpp')
-rw-r--r--scene/3d/path_3d.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index 04ac01a085..f02826b1c4 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -40,11 +40,12 @@ Path3D::Path3D() {
}
Path3D::~Path3D() {
- ERR_FAIL_NULL(RenderingServer::get_singleton());
if (debug_instance.is_valid()) {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RS::get_singleton()->free(debug_instance);
}
if (debug_mesh.is_valid()) {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RS::get_singleton()->free(debug_mesh->get_rid());
}
}