a11y: Do not refer to destructed QObject in Windows bridge
authorJan Arve Saether <jan-arve.saether@digia.com>
Tue, 11 Dec 2012 10:39:08 +0000 (11:39 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sun, 16 Dec 2012 00:51:22 +0000 (01:51 +0100)
commitbe330d8959dbd1a589a9d46e4ed12b5b16fffbb4
tree54aa02e264a6141b74e93b4c94357b77c5ec4b03
parent91e8baa37baea4a79641c1eb0512d609745a033b
a11y: Do not refer to destructed QObject in Windows bridge

The crash could happen if a QWidget in the UI got deleted, and
the AT client later tried to access the widget through the cache
(qAccessibleRecentSentEvents()).

Solution: Use a QPointer as a guard.

Task-number: QTBUG-26187
Change-Id: I41eab158989fddfa147309b6bd91ac0cd1fe7b1a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/gui/accessible/qaccessible_win.cpp
tests/auto/qaccessibility/tst_qaccessibility.cpp