diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2019-10-01 15:09:01 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2019-10-02 17:25:43 +0200 |
commit | 788865b805bc91151ac8fe18bf7b92b1212ee07d (patch) | |
tree | f9f599863cfcd3e4e0598fb5cd3213e702b22daf /.gitignore | |
parent | cc3ef6cd7af09f7410e29f2fe7e403e25a2768bc (diff) |
Imagine: fix crash when switching between 9-patch and regular image
Consider the following changes in source:
normal.png => press.9.png => normal.png => focus.png
If the last two events happen quickly, pixmapChange() can be called
twice with no call to updatePaintNode() inbetween. On the first call,
resetNode will be true (because ninePatch is not null since it is still
in the process of going from a 9-patch image to a regular image),
and on the second call, resetNode would be false if we didn't have this
check. This results in the oldNode never being deleted, and QQuickImage
tries to static_cast a QQuickNinePatchImage to a QSGInternalImageNode.
Only change resetNode when it's false; i.e. when no reset is pending.
updatePaintNode() will take care of setting it to false if it's true.
Change-Id: I614c172c3e24fda2506f081f8fcdb6acd1c65fb8
Fixes: QTBUG-78790
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions