Bugfix: NPE when closing perspectives that have no context