aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-11-14 13:00:23 +0100
committerTobias Hunger <tobias.hunger@qt.io>2017-11-14 14:19:58 +0000
commit77bea93a6ee09ed7dcccdbb5f28dc14bdb593e0f (patch)
treed191b2e89e46a1ca0cf293c7755dc7cdecad6b00 /src
parentda18c76b96963f5cadb7103bf6da6409b3ade070 (diff)
RunControl: Make RunControl::canReUseAppOutputPane more robust
The pointer passed in was assumed to be non-null, but that does not need to be the case. This should make the function more robust in face of errors. The RunControl passed into the method is taken from a QPointer. So if the RunControl is destroyed, that pointer may be nullptr. Task-number: QTCREATORBUG-19269 Change-Id: I42e7b9d5582df2ee0830c8f92af4e4a97e7d6417 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 03843d3a9e..9923486a73 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -1214,7 +1214,7 @@ Project *RunControl::project() const
bool RunControl::canReUseOutputPane(const RunControl *other) const
{
- if (other->isRunning())
+ if (!other || other->isRunning())
return false;
return d->runnable.canReUseOutputPane(other->d->runnable);