summaryrefslogtreecommitdiff
path: root/modules/noise
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2022-12-12 12:42:37 -0500
committerAdam Scott <ascott.ca@gmail.com>2022-12-29 16:23:38 -0500
commitea33001b95d57f7b400d78d4b20bef23293d9077 (patch)
tree71ac58a0294e7417e42601cd46fccaac4bcbbe2e /modules/noise
parenta75493091823020d858fabadbfa5994da0d658cb (diff)
Add safety-checks before some servers `free()`
Diffstat (limited to 'modules/noise')
-rw-r--r--modules/noise/noise_texture_2d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/noise/noise_texture_2d.cpp b/modules/noise/noise_texture_2d.cpp
index 8c785d7591..1b6f1d7897 100644
--- a/modules/noise/noise_texture_2d.cpp
+++ b/modules/noise/noise_texture_2d.cpp
@@ -40,6 +40,7 @@ NoiseTexture2D::NoiseTexture2D() {
}
NoiseTexture2D::~NoiseTexture2D() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
if (texture.is_valid()) {
RS::get_singleton()->free(texture);
}