From 1876c17c354cf60160f408950bb6e5cc4a4f879e Mon Sep 17 00:00:00 2001 From: Alexandr Akulich Date: Fri, 10 Aug 2018 15:38:13 +0300 Subject: QQuickStackView: fix crash on viewItemTransitionFinished() Check transitioner for nullptr before access. The transitioner created only on some transition setter called and remain nullptr on base unstyled StackView from templates. Task-number: QTBUG-69897 Change-Id: I51564c5e7195112764f5a63b3b48c302a6d29146 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickstackview_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp index e0e1d9ef..3d6afa9f 100644 --- a/src/quicktemplates2/qquickstackview_p.cpp +++ b/src/quicktemplates2/qquickstackview_p.cpp @@ -272,7 +272,7 @@ void QQuickStackViewPrivate::viewItemTransitionFinished(QQuickItemViewTransition removed += element; } - if (transitioner->runningJobs.isEmpty()) { + if (transitioner && transitioner->runningJobs.isEmpty()) { // ~QQuickStackElement() emits QQuickStackViewAttached::removed(), which may be used // to modify the stack. Set the status first and make a copy of the destroyable stack // elements to exclude any modifications that may happen during the loop. (QTBUG-62153) -- cgit v1.2.3