Skip to content

Commit

Permalink
Merge pull request #693 from wolfseifert/delete-timeline-causes-crash…
Browse files Browse the repository at this point in the history
…-on-windows-#680

Delete timeline causes crash on windows #680
  • Loading branch information
Murmele authored Feb 20, 2024
2 parents dad3383 + 3cd3ddb commit d37a32f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ void MainWindow::setSideBarVisible(bool visible) {
splitter->setSizes({static_cast<int>(pos * value), 1});
});

connect(timeline, &QTimeLine::finished, [timeline] { delete timeline; });
connect(timeline, &QTimeLine::finished,
[timeline] { timeline->deleteLater(); });

timeline->start();
}
Expand Down
3 changes: 2 additions & 1 deletion src/ui/RepoView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ void RepoView::setLogVisible(bool visible) {
setSizes({1, static_cast<int>(pos * value)});
});

connect(timeline, &QTimeLine::finished, [timeline] { delete timeline; });
connect(timeline, &QTimeLine::finished,
[timeline] { timeline->deleteLater(); });

timeline->start();
}
Expand Down

0 comments on commit d37a32f

Please sign in to comment.