From fd3b028425d0a6f98f638f67766e13ce19d01361 2015-01-22 12:36:40 From: Titta Heikkala Date: 2015-01-22 12:36:40 Subject: [PATCH] Fix animation crash An existing animation needs to be removed from an item before the series is removed. Change-Id: Id62a21ec74ba144d8a74228471b5878620522a32 Task-number: QTRD-3484 Reviewed-by: Miikka Heikkinen --- diff --git a/src/charts/chartpresenter.cpp b/src/charts/chartpresenter.cpp index b8ec2cf..7ae7310 100644 --- a/src/charts/chartpresenter.cpp +++ b/src/charts/chartpresenter.cpp @@ -120,6 +120,8 @@ void ChartPresenter::handleSeriesRemoved(QAbstractSeries *series) chart->hide(); chart->disconnect(); chart->deleteLater(); + if (chart->animation()) + chart->animation()->stopAndDestroyLater(); m_chartItems.removeAll(chart); m_series.removeAll(series); m_layout->invalidate();