diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-01-04 17:14:48 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-01-04 16:20:42 +0000 |
commit | be4d1093b468b71638dd3aeaf2149c4bfe8b9842 (patch) | |
tree | 6536682e0c975ebda95515608e0819f29c1c6d9e /src/plugins/projectexplorer/runconfigurationaspects.cpp | |
parent | 86af16725d62719168ede5ef79aa964c107d6539 (diff) |
ProjectExplorer: Do not crash when setting custom executable
Do not crash when setting custom executable without ever visiting
the runconfiguration before.
At that point the chooser is still a nullptr.
Task-number: QTCREATORBUG-17505
Change-Id: I27fb19845adf9c7ec0ad5a9435c8d86a573a2532
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/runconfigurationaspects.cpp')
-rw-r--r-- | src/plugins/projectexplorer/runconfigurationaspects.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index 4ba7eb35bd..270e600c1d 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -258,7 +258,7 @@ PathChooser *WorkingDirectoryAspect::pathChooser() const */ ArgumentsAspect::ArgumentsAspect(RunConfiguration *runConfig, const QString &key, const QString &arguments) - : IRunConfigurationAspect(runConfig), m_arguments(arguments), m_chooser(0), m_key(key) + : IRunConfigurationAspect(runConfig), m_arguments(arguments), m_key(key) { setDisplayName(tr("Arguments")); setId("ArgumentsAspect"); @@ -280,7 +280,7 @@ void ArgumentsAspect::setArguments(const QString &arguments) m_arguments = arguments; emit argumentsChanged(arguments); } - if (m_chooser->text() != arguments) + if (m_chooser && m_chooser->text() != arguments) m_chooser->setText(arguments); } |