Merge pull request #31360 from nekomatata/fix-error-parallax-mirroring

Fixed error in ParallaxLayer when set_mirroring is called before entering the tree
This commit is contained in:
Rémi Verschelde 2019-08-14 13:48:22 +02:00 committed by GitHub
commit 5f44ee30ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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) {