diff --git a/src/ui/MainWindow.cpp b/src/ui/MainWindow.cpp index ed04212be..46586b5f5 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 1f4866c69..713b82cc5 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(); }