summaryrefslogtreecommitdiff
path: root/servers/camera
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 /servers/camera
parenta75493091823020d858fabadbfa5994da0d658cb (diff)
Add safety-checks before some servers `free()`
Diffstat (limited to 'servers/camera')
-rw-r--r--servers/camera/camera_feed.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/camera/camera_feed.cpp b/servers/camera/camera_feed.cpp
index 624c06ecf1..e5b160ae27 100644
--- a/servers/camera/camera_feed.cpp
+++ b/servers/camera/camera_feed.cpp
@@ -165,6 +165,7 @@ CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
CameraFeed::~CameraFeed() {
// Free our textures
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RenderingServer::get_singleton()->free(texture[CameraServer::FEED_Y_IMAGE]);
RenderingServer::get_singleton()->free(texture[CameraServer::FEED_CBCR_IMAGE]);
}