diff options
author | Andreas Aardal Hanssen <andreas@hanssen.name> | 2013-02-15 18:10:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 11:07:13 +0100 |
commit | 615d120e5a3ccbda82dfa6eeaa445c613adc7ca2 (patch) | |
tree | 11839dee64224d4b1845f6f1f956debec5f4b050 /src/3rdparty/libpng | |
parent | f0221d359499f675115da1f47dd3669a4383653d (diff) |
Fix crash in somewhat faulty QGraphicsProxyWidget unit test.
The crash is deep inside QGraphicsSceneIndex, which calls boundingRect()
on the item that is being destroyed. The vtable is busted, resulting in
a pure virtual function call. There's a more proper fix for this lying
around somewhere but in this particular case we can get the test to
not crash by guarding based on whether the item has a cursor set. This
also happens to speed up QGraphicsItem destruction a bit so I figured
it's a win-win situation to fix it. This case will still crash if the
item actually had a cursor set but that makes the case even more narrow.
Generally speaking, creating objects partially on the stack and
partially on the heap, mixing parent/child relationships and then
deleting one of the heap objects is quite sketchy and I doubt it happens
much outside of this unit test.
Change-Id: I25393d2cafb1256269ab6681519bd554cc380bfd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/3rdparty/libpng')
0 files changed, 0 insertions, 0 deletions