TabBar: fix a segfaul when closing a split view by clicking on the mouse wheel