Fix bug where middle-clicking on empty tab bar crashes program