Fix getting an error message when repeatedly entering and exiting the tree

This commit is contained in:
Rindbee 2022-09-02 10:30:08 +08:00
parent c6fd311da0
commit 621b9a1bfe

View File

@ -338,6 +338,7 @@ void CanvasItem::_notification(int p_what) {
}
if (window) {
window->disconnect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &CanvasItem::_window_visibility_changed));
window = nullptr;
}
global_invalid = true;
parent_visible_in_tree = false;