Skip to content

Commit 74683b1

Browse files
committed
Hotfix: Crash on project load if statistics tab was open
1 parent 61d94da commit 74683b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/main_window.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,10 @@ void MainWindow::performUpdatesAfterUserAction(const ItemTypeMapper* const mappe
831831
*/
832832
void MainWindow::scrollToTopAfterSorting()
833833
{
834-
QTableView* const tableView = getActiveMapper()->tableView;
834+
ItemTypeMapper* mapper = getActiveMapper();
835+
if (!mapper) return;
836+
837+
QTableView* const tableView = mapper->tableView;
835838
const int horizontalScroll = tableView->horizontalScrollBar()->value();
836839
tableView->scrollToTop();
837840
tableView->horizontalScrollBar()->setValue(horizontalScroll);

0 commit comments

Comments
 (0)