From ea73bb9146af5ecc21978ec0bec6bec6c4b1423d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 3 Apr 2023 08:17:38 +0200 Subject: [PATCH] DeviceSupport: Silence soft assert Change-Id: Ifa5bcbb799fcfeb25254a87a1e3e62bc8864bf4d Reviewed-by: hjk --- src/plugins/projectexplorer/devicesupport/idevicefactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp b/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp index e88a1e61367..b5178445702 100644 --- a/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp @@ -67,7 +67,8 @@ IDevice::Ptr IDeviceFactory::create() const return {}; IDevice::Ptr device = m_creator(); - QTC_ASSERT(device, return {}); + if (!device) // e.g. Cancel used on the dialog to create a device + return {}; device->setDefaultDisplayName(displayName()); return device; }