forked from qt-creator/qt-creator
CMakePM: Remove pointer check for null
The pointer contains the parent class passed with "this" and will never be null. Coverity-Id: 1568097 Dereference after null check (FORWARD_NULL) Coverity-Id: 1568100 Uninitialized pointer field (UNINIT_CTOR) Coverity-Id: 1568111 Dereference before null check (REVERSE_INULL) Change-Id: I40e32d162689c749d498c4a63c073c0e336a3626 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -171,8 +171,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
m_configFilterModel(new CategorySortFilterModel(this)),
|
||||
m_configTextFilterModel(new CategorySortFilterModel(this))
|
||||
{
|
||||
QTC_ASSERT(m_buildConfig, return);
|
||||
|
||||
m_configureDetailsWidget = new DetailsWidget;
|
||||
|
||||
updateConfigureDetailsWidgetsSummary();
|
||||
@@ -682,7 +680,7 @@ void CMakeBuildSettingsWidget::updateConfigureDetailsWidgetsSummary(
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(m_buildConfig->kit());
|
||||
cmd.setExecutable(tool ? tool->cmakeExecutable() : "cmake");
|
||||
|
||||
const FilePath buildDirectory = m_buildConfig ? m_buildConfig->buildDirectory() : ".";
|
||||
const FilePath buildDirectory = m_buildConfig->buildDirectory();
|
||||
|
||||
cmd.addArgs({"-S", m_buildConfig->project()->projectDirectory().path()});
|
||||
cmd.addArgs({"-B", buildDirectory.path()});
|
||||
|
||||
Reference in New Issue
Block a user