diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 15678c92812..4bed2c8c7e4 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;