From 7fdb460e5d363e6ddc5bcf9724c11c33056fc1a4 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Tue, 4 Oct 2022 15:04:55 -0700 Subject: Properly assign texture RID when creating ImageTexture3D --- scene/resources/texture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 15678c9281..4bed2c8c7e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1209,6 +1209,8 @@ Error ImageTexture3D::create(Image::Format p_format, int p_width, int p_height, if (texture.is_valid()) { RenderingServer::get_singleton()->texture_replace(texture, tex); + } else { + texture = tex; } return OK; -- cgit v1.2.3