diff options
author | Alexandr Akulich <akulichalexander@gmail.com> | 2018-08-10 15:38:13 +0300 |
---|---|---|
committer | Alexandr Akulich <akulichalexander@gmail.com> | 2018-08-11 09:09:26 +0000 |
commit | 1876c17c354cf60160f408950bb6e5cc4a4f879e (patch) | |
tree | 4d317e9e792a6a971202ae82c7c4681418289252 /src | |
parent | 3061afd9bdb952cdfd1b011cf1c10e98bb09a8d9 (diff) |
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 <jpnurmi@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickstackview_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |