Skip to content
  • Ahmad Samir's avatar
    Fix crash when closing a tab using the close button · 39d3437d
    Ahmad Samir authored and Tomaz  Canabrava's avatar Tomaz Canabrava committed
    Looking at the crash backtraces from the bug reports, it seems this is what
    happens, when you have two tabs open, then click the close button on the
    non-current tab:
      - QTabBar::currentChanged() is emitted, the TerminalDisplay pointer is
        still not null at this point (the code checks for that)
      - TabbedViewContainer::currentTabChanged()
      - TabbedViewContainer::activeViewChanged()
      - ViewManager::activateView(), at this point the TerminalDisplay pointer
        could be null, which then crashes when we call Widget::setFocus()
    
    BUG: 411962
    FIXED-IN: 21.12
    39d3437d