diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-11-30 14:49:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-01 08:56:44 +0000 |
commit | 9aeebaa919a61730e9ebe4ad6a4a18393232c08e (patch) | |
tree | be97068bfc6a93ca84313f6c27fc4d2e64487569 | |
parent | 4da9dbab430453f447282c4b6413730e899a945e (diff) |
Fix assert when cloning hidden BMGFill
In case BMGFill is hidden, properties like m_gradient are not
initialized - see BMGFill(const QJsonObject &definition ...).
If this hidden fill is then cloned, Q_UNREACHABLE is hit.
Avoid this by exiting early in this case.
Change-Id: I2d7e3121bfeebb5a9730d67d0bf6d45343c9d433
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 9f631e12e51104822acdfcccdf8dca8df9ad6ee0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/bodymovin/bmgfill.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bodymovin/bmgfill.cpp b/src/bodymovin/bmgfill.cpp index 333e25b..569b204 100644 --- a/src/bodymovin/bmgfill.cpp +++ b/src/bodymovin/bmgfill.cpp @@ -39,6 +39,9 @@ QT_BEGIN_NAMESPACE BMGFill::BMGFill(const BMGFill &other) : BMShape(other) { + if (m_hidden) + return; + m_opacity = other.m_opacity; m_startPoint = other.m_startPoint; m_endPoint = other.m_endPoint; |