Fix app could crash after closing split view (fix #292)