diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-13 15:52:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-13 21:32:15 +0000 |
commit | 026edef351a73f75c0a0ce12c8afb9ef1aa19139 (patch) | |
tree | 9cb2f3334b480eb6f57137914e464d7b7716ca5e /src/quick | |
parent | 0a775ded35acf7172e3f852d55de7e28a5370653 (diff) |
Fix illegal downcast in QQuickStateGroup destruction
One state hadn't the group unset and ended up with a non-null group
pointer that was no longer a group.
Change-Id: I916fdab577c90e859a49b97426396c78e7ff426f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/util/qquickstategroup.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp index d8daec2f07..b53949d21c 100644 --- a/src/quick/util/qquickstategroup.cpp +++ b/src/quick/util/qquickstategroup.cpp @@ -130,6 +130,8 @@ QQuickStateGroup::~QQuickStateGroup() Q_D(const QQuickStateGroup); for (int i = 0; i < d->states.count(); ++i) d->states.at(i)->setStateGroup(nullptr); + if (d->nullState) + d->nullState->setStateGroup(nullptr); } QList<QQuickState *> QQuickStateGroup::states() const |