diff --git a/src/ui/MainWindow.cpp b/src/ui/MainWindow.cpp index ed04212b..46586b5f 100644 --- a/src/ui/MainWindow.cpp +++ b/src/ui/MainWindow.cpp @@ -201,7 +201,8 @@ void MainWindow::setSideBarVisible(bool visible) { splitter->setSizes({static_cast(pos * value), 1}); }); - connect(timeline, &QTimeLine::finished, [timeline] { delete timeline; }); + connect(timeline, &QTimeLine::finished, + [timeline] { timeline->deleteLater(); }); timeline->start(); } diff --git a/src/ui/RepoView.cpp b/src/ui/RepoView.cpp index 1f4866c6..713b82cc 100644 --- a/src/ui/RepoView.cpp +++ b/src/ui/RepoView.cpp @@ -890,7 +890,8 @@ void RepoView::setLogVisible(bool visible) { setSizes({1, static_cast(pos * value)}); }); - connect(timeline, &QTimeLine::finished, [timeline] { delete timeline; }); + connect(timeline, &QTimeLine::finished, + [timeline] { timeline->deleteLater(); }); timeline->start(); }