Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
Qt Creator 4.7.2
-
None
Description
I faced the nullptr de reference issue here:
https://github.com/qt-creator/qt-creator/blob/61aa2d37417e42479eabbd38179f8792101b7578/src/plugins/android/androiddeployqtstep.cpp#L96
source of nullptr is
QtVersionManager::version()
BaseQtVersion *QtVersionManager::version(int id) { QTC_ASSERT(isLoaded(), return nullptr); QMap<int, BaseQtVersion *>::const_iterator it = m_versions.constFind(id); if (it == m_versions.constEnd()) return nullptr; return it.value(); }
The QtSupport::QtKitInformation::qtVersion calls the QtVersionManager::version - so it may return nullptr but code simply calls
AndroidDeployQtStep::AndroidDeployQtStep()
QtSupport::QtKitInformation::qtVersion(target()->kit())->qtVersion()
so ->qtVersion() may be called on nullptr.
Because of this I'm not able to work with Android project.
Attachments
For Gerrit Dashboard: QTCREATORBUG-21528 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
246820,1 | Android: Avoid nullptr access | 4.8 | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |