Skip to content

S&R: fix crash when closing search tabs

Ahmad Samir requested to merge work/ahmad/search-tabbar into master

Always call QTabWidget::removeTab() so that the widget represented by that tab is removed from the underlying QStackedWidget, otherwise the code could try accessing a MatchModel object that has already been deleted as its parent Results object has been deleted.

Only set m_curResults to nullptr if it belongs to the tab being closed, e.g. if you have two or more search tabs, you can click the close button of a tab other than the current one.

Merge request reports