summaryrefslogtreecommitdiff
path: root/scene/resources/immediate_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/immediate_mesh.cpp')
-rw-r--r--scene/resources/immediate_mesh.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/immediate_mesh.cpp b/scene/resources/immediate_mesh.cpp
index 90cc3ea5f4..2defe729cc 100644
--- a/scene/resources/immediate_mesh.cpp
+++ b/scene/resources/immediate_mesh.cpp
@@ -410,5 +410,6 @@ ImmediateMesh::ImmediateMesh() {
mesh = RS::get_singleton()->mesh_create();
}
ImmediateMesh::~ImmediateMesh() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RS::get_singleton()->free(mesh);
}