forked from qt-creator/qt-creator
RemoteLinux: Guard against nullptr access
This fixes a potential crash when switching the device of a kit. Change-Id: Ibdce9859cb347401706fe4de1c56aa8bb890233b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
||||
auto fetchButton = new QPushButton(Tr::tr("Fetch Device Environment"));
|
||||
addWidget(fetchButton);
|
||||
|
||||
connect(target, &Target::kitChanged, [aspect] { aspect->setRemoteEnvironment({}); });
|
||||
connect(target, &Target::kitChanged, aspect, [aspect] { aspect->setRemoteEnvironment({}); });
|
||||
|
||||
connect(fetchButton, &QPushButton::clicked, this, [aspect, target] {
|
||||
if (IDevice::ConstPtr device = DeviceKitAspect::device(target->kit())) {
|
||||
|
||||
Reference in New Issue
Block a user