diff options
author | hjk <hjk@theqtcompany.com> | 2016-06-24 12:09:37 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2016-06-24 11:31:46 +0000 |
commit | 438697219ff8ae4ad78ed5cd176abcce10bc7348 (patch) | |
tree | 34720e81f4d0f934b48255df613abb986097cf1a | |
parent | b06cc736f4cb9a47746cc5a03cfd5f244e45948a (diff) | |
download | qt-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.h | 2 |
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()); |