mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #52365 from jitspoe/3.x.viewport_error_fix
[3.x] Fix ViewportTexture error when viewport is used from a child scene
This commit is contained in:
@@ -54,17 +54,17 @@
|
||||
#include "servers/physics_2d_server.h"
|
||||
|
||||
void ViewportTexture::setup_local_to_scene() {
|
||||
Node *local_scene = get_local_scene();
|
||||
if (!local_scene) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (vp) {
|
||||
vp->viewport_textures.erase(this);
|
||||
}
|
||||
|
||||
vp = nullptr;
|
||||
|
||||
Node *local_scene = get_local_scene();
|
||||
if (!local_scene) {
|
||||
return;
|
||||
}
|
||||
|
||||
Node *vpn = local_scene->get_node(path);
|
||||
ERR_FAIL_COND_MSG(!vpn, "ViewportTexture: Path to node is invalid.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user