diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-14 13:48:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 13:48:22 +0200 |
commit | 5f44ee30ec10009b067ff343f3826fd35c10a4d6 (patch) | |
tree | 1fc779563e57364940f346560e015fb58c3f1da7 /scene | |
parent | 6c607c356484c30162e713c91bbc7f6e4a4aeda4 (diff) | |
parent | 927a7916f659d5ddf845f02d802f7c8890824246 (diff) |
Merge pull request #31360 from nekomatata/fix-error-parallax-mirroring
Fixed error in ParallaxLayer when set_mirroring is called before entering the tree
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/parallax_layer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 9a6b63b9a3..0823e09110 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -69,6 +69,9 @@ Size2 ParallaxLayer::get_motion_offset() const { void ParallaxLayer::_update_mirroring() { + if (!is_inside_tree()) + return; + ParallaxBackground *pb = Object::cast_to<ParallaxBackground>(get_parent()); if (pb) { |