We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61d94da commit 74683b1Copy full SHA for 74683b1
src/main/main_window.cpp
@@ -831,7 +831,10 @@ void MainWindow::performUpdatesAfterUserAction(const ItemTypeMapper* const mappe
831
*/
832
void MainWindow::scrollToTopAfterSorting()
833
{
834
- QTableView* const tableView = getActiveMapper()->tableView;
+ ItemTypeMapper* mapper = getActiveMapper();
835
+ if (!mapper) return;
836
+
837
+ QTableView* const tableView = mapper->tableView;
838
const int horizontalScroll = tableView->horizontalScrollBar()->value();
839
tableView->scrollToTop();
840
tableView->horizontalScrollBar()->setValue(horizontalScroll);
0 commit comments