it seems you ommitted a data = argument to the tree function call, it has only the formula and control params. However, I would have thought therefore that the tree() call would have errored, rather than appearing to complete and only erroring when you want to display...
had you done something to attach the dataset to the environment to let the tree() work without the data param ?
A reproducible example would be useful. seems nba is only 100x5 , which seems it would be small enough to communicate here fully. You could do so with the dput() function.