aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>2015-11-12 16:23:42 +0200
committerPasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>2015-12-12 20:05:25 +0000
commit7ac5228144b692e40d40dfcfe2e3799f2ad4c620 (patch)
tree00f1051ae5abb4d961e4d4703811c9e998b02bad
parentPostgreSQL: Fix memory leak in QPSQLDriverPrivate::getPSQLVersion() (diff)
downloadqtbase-7ac5228144b692e40d40dfcfe2e3799f2ad4c620.tar.xz
qtbase-7ac5228144b692e40d40dfcfe2e3799f2ad4c620.zip
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>
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
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)