From ea33001b95d57f7b400d78d4b20bef23293d9077 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 12 Dec 2022 12:42:37 -0500 Subject: Add safety-checks before some servers `free()` --- scene/resources/immediate_mesh.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/resources/immediate_mesh.cpp') 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); } -- cgit v1.2.3