diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> | 2015-11-12 16:23:42 +0200 |
---|---|---|
committer | Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> | 2015-12-12 20:05:25 +0000 |
commit | 7ac5228144b692e40d40dfcfe2e3799f2ad4c620 (patch) | |
tree | 00f1051ae5abb4d961e4d4703811c9e998b02bad /src/gui | |
parent | e8eaf82e584c2d27bdeb0a50055e10d55d9c00dc (diff) |
Delete QInputDeviceManager when deleting QGuiApplication
Without deleting m_inputDeviceManager instance it will remain
in process and causes crash when creating+destroying QGuiApplication
multiple times in process. Crash happens because m_inputDeviceManager
already exists when creating new instance of QGuiApplication and
metadata for QInputDeviceManager is not anymore valid and crash when
accessing it e.g. using connect() function.
Change-Id: I5acb1c5f6ce2ba9665fa893047210a913debe4e4
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 64be8ee3d9..c2b561aa93 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -603,6 +603,8 @@ QGuiApplication::~QGuiApplication() QGuiApplicationPrivate::platform_name = 0; delete QGuiApplicationPrivate::displayName; QGuiApplicationPrivate::displayName = 0; + delete QGuiApplicationPrivate::m_inputDeviceManager; + QGuiApplicationPrivate::m_inputDeviceManager = 0; } QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags) |