Fix CanvasLayer trying to re-stack while out of tree

Fixes #23718.
This commit is contained in:
Pedro J. Estébanez 2018-11-16 01:01:17 +01:00
parent a16d9c6ab6
commit 5dac6ef486
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,9 @@ void CanvasLayer::_notification(int p_what) {
} break;
case NOTIFICATION_MOVED_IN_PARENT: {
if (is_inside_tree())
VisualServer::get_singleton()->viewport_set_canvas_stacking(viewport, canvas, layer, get_position_in_parent());
} break;
}
}