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>
This commit is contained in:
parent
e8eaf82e58
commit
7ac5228144
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user