diff options
Diffstat (limited to 'scene/3d/sprite_3d.cpp')
-rw-r--r-- | scene/3d/sprite_3d.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index e45cb6d5b9..a49fd17746 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -70,13 +70,9 @@ void SpriteBase3D::_notification(int p_what) { if (!pending_update) _im_update(); - Node *parent = get_parent(); - if (parent) { - - parent_sprite = parent->cast_to<SpriteBase3D>(); - if (parent_sprite) { - pI = parent_sprite->children.push_back(this); - } + parent_sprite = Object::cast_to<SpriteBase3D>(get_parent()); + if (parent_sprite) { + pI = parent_sprite->children.push_back(this); } } |