diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-12-21 17:19:59 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-12-22 01:34:56 +0100 |
commit | 41f96866eeaa2d26c203c50401367db85b3eb5e9 (patch) | |
tree | e77829e1a37e36a9804450c4fb560503ad1d5821 /src/plugins/platforms/windows/qwindowsglcontext.h | |
parent | 7bd243b3fb7ee068ccf69ef7181acfac56e4e7ed (diff) |
Windows: Don't crash in mouse handling when QApplication is recreated
We store the primary pointing device in a static variable to avoid the
lookup for each mouse event. However, when QApplication is destroyed,
then the device is destroyed, and the pointer needs to be reset so
that QApplication can be created again by the same process without the
first mouse event crashing the program.
Use QPointer to prevent the pointer from becoming dangling.
Fixes: QTBUG-99319
Pick-to: 6.2 6.3
Change-Id: Ie534c5eee48afb83e3a4adf70fc6cb4a2c310a7a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsglcontext.h')
0 files changed, 0 insertions, 0 deletions