Fix 'NoneType' has no attribute 'focus_view'

Manually closing the repl's view can cause _view.window()
to be None before the next 'update_view_loop' iteration.
If 'view_auto_close' is enabled, this will cause an exception.