summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-06-24 12:09:37 +0200
committerEike Ziller <eike.ziller@qt.io>2016-06-24 11:31:46 +0000
commit438697219ff8ae4ad78ed5cd176abcce10bc7348 (patch)
tree34720e81f4d0f934b48255df613abb986097cf1a
parentb06cc736f4cb9a47746cc5a03cfd5f244e45948a (diff)
downloadqt-creator-438697219ff8ae4ad78ed5cd176abcce10bc7348.tar.gz
ProjectExplorer: Fix comparison with default-constructed Runnables
Regression was introduced with 3f11ef92167. The original check asserting 'that != 0' is still needed without dynamic_cast, as d-pointer of 'other' can be statically 0 for default-constructed Runnable objects. Change-Id: Ibee898ffc61fb2f4a6a6276390fdf6d517fde546 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 01fe5b9af4..225c04bf43 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -173,6 +173,8 @@ public:
bool equals(const std::unique_ptr<ClonableConcept> &other) const override
{
+ if (!other.get())
+ return false;
if (other->typeId() != typeId())
return false;
auto that = static_cast<const ClonableModel<T> *>(other.get());