From 37f5501a1f1e6bb0e26e836ba95ad2c65f597742 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 10 Jun 2024 15:03:12 +0200 Subject: [PATCH] RemoteLinux: Do not try to fetch environment of a disconnected device Change-Id: Ibe1ca43fa3d9d0ade2fa3db1808c1a5fd2cb7232 Reviewed-by: Marcus Tillmanns --- src/plugins/remotelinux/linuxdevice.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 8be6a03d03b..35761285482 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -366,6 +366,9 @@ Environment LinuxDevicePrivate::getEnvironment() if (m_environmentCache.has_value()) return m_environmentCache.value(); + if (m_disconnected) + return {}; + Process getEnvProc; getEnvProc.setCommand(CommandLine{q->filePath("env")}); using namespace std::chrono;